File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,18 @@ Argument::Argument(StringRef Key, unsigned long long N)
44
44
: Key(Key), Val(llvm::utostr(N)) {}
45
45
46
46
Argument::Argument (StringRef Key, SILFunction *F)
47
- : Key(Key),
48
- Val((Twine(" \" " ) +
49
- Demangle::demangleSymbolAsString(
50
- F->getName (),
51
- Demangle::DemangleOptions::SimplifiedUIDemangleOptions()) +
52
- "\"")
53
- .str()) {
54
- if (F->hasLocation ())
55
- Loc = F->getLocation ().getSourceLoc ();
47
+ : Key(Key) {
48
+ auto DO = Demangle::DemangleOptions::SimplifiedUIDemangleOptions ();
49
+ // Enable module names so that we have a way of filtering out
50
+ // stdlib-related remarks.
51
+ DO.DisplayModuleNames = true ;
52
+
53
+ Val = (Twine (" \" " ) + Demangle::demangleSymbolAsString (F->getName (), DO) +
54
+ " \" " )
55
+ .str ();
56
+
57
+ if (F->hasLocation ())
58
+ Loc = F->getLocation ().getSourceLoc ();
56
59
}
57
60
58
61
template <typename DerivedT> std::string Remark<DerivedT>::getMsg() const {
Original file line number Diff line number Diff line change @@ -22,13 +22,13 @@ public func bar() {
22
22
// YAML-NEXT: Column: 3
23
23
// YAML-NEXT: Function: 'bar()'
24
24
// YAML-NEXT: Args:
25
- // YAML-NEXT: - Callee: '"foo()"'
25
+ // YAML-NEXT: - Callee: '"optrecordmod. foo()"'
26
26
// YAML-NEXT: DebugLoc:
27
27
// YAML-NEXT: File: {{.*}}opt-record.swift
28
28
// YAML-NEXT: Line: 11
29
29
// YAML-NEXT: Column: 6
30
30
// YAML-NEXT: - String: ' inlined into '
31
- // YAML-NEXT: - Caller: '"bar()"'
31
+ // YAML-NEXT: - Caller: '"optrecordmod. bar()"'
32
32
// YAML-NEXT: DebugLoc:
33
33
// YAML-NEXT: File: {{.*}}opt-record.swift
34
34
// YAML-NEXT: Line: 15
Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ func small() {
38
38
39
39
func foo( ) {
40
40
// REMARK_MISSED-NOT: remark: {{.*}} inlined
41
- // REMARK_MISSED: opt-remark.swift:43:2: remark: Not profitable to inline function "big()" (cost = {{.*}}, benefit = {{.*}})
41
+ // REMARK_MISSED: opt-remark.swift:43:2: remark: Not profitable to inline function "null. big()" (cost = {{.*}}, benefit = {{.*}})
42
42
// REMARK_MISSED-NOT: remark: {{.*}} inlined
43
43
big ( )
44
44
// REMARK_PASSED-NOT: remark: Not profitable
45
- // REMARK_PASSED: opt-remark.swift:47:3: remark: "small()" inlined into "foo()" (cost = {{.*}}, benefit = {{.*}})
45
+ // REMARK_PASSED: opt-remark.swift:47:3: remark: "null. small()" inlined into "null. foo()" (cost = {{.*}}, benefit = {{.*}})
46
46
// REMARK_PASSED-NOT: remark: Not profitable
47
47
small ( )
48
48
}
You can’t perform that action at this time.
0 commit comments