forked from OSchip/llvm-project
Change trailing locations printing to also print unknown locations. This will allow for truly round tripping debug locations given that we assign locations while parsing IR.
PiperOrigin-RevId: 230627191
This commit is contained in:
parent
6859f33292
commit
98c729d6f1
|
@ -419,11 +419,8 @@ void ModulePrinter::printTrailingLocation(Location loc) {
|
|||
if (!shouldPrintDebugInfoOpt)
|
||||
return;
|
||||
|
||||
// If the location is not unknown then print it.
|
||||
if (!loc.isa<UnknownLoc>()) {
|
||||
os << " ";
|
||||
printLocation(loc);
|
||||
}
|
||||
os << " ";
|
||||
printLocation(loc);
|
||||
}
|
||||
|
||||
void ModulePrinter::printLocationInternal(Location loc) {
|
||||
|
|
|
@ -20,7 +20,6 @@ func @inline_notation() -> i32 loc("mysource.cc":10:8) {
|
|||
if #set0(%2) loc(fused<"myPass">["foo", "foo2"]) {
|
||||
}
|
||||
|
||||
// Unknown locations are not printed.
|
||||
// CHECK: return %0 : {{i32$}}
|
||||
// CHECK: return %0 : i32 loc(unknown)
|
||||
return %1 : i32 loc(unknown)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue