more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 6176b86..9cbefa3 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -41,7 +41,7 @@
void CGDebugInfo::setLocation(SourceLocation Loc) {
if (Loc.isValid())
- CurLoc = M->getContext().getSourceManager().getLogicalLoc(Loc);
+ CurLoc = M->getContext().getSourceManager().getInstantiationLoc(Loc);
}
/// getOrCreateCompileUnit - Get the compile unit from the cache or create a new
@@ -157,7 +157,7 @@
llvm::DICompileUnit DefUnit = getOrCreateCompileUnit(DefLoc);
SourceManager &SM = M->getContext().getSourceManager();
- uint64_t Line = SM.getLogicalLineNumber(DefLoc);
+ uint64_t Line = SM.getInstantiationLineNumber(DefLoc);
return DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_typedef, Unit,
TyName, DefUnit, Line, 0, 0, 0, 0, Src);
@@ -209,7 +209,7 @@
std::string Name = Decl->getNameAsString();
llvm::DICompileUnit DefUnit = getOrCreateCompileUnit(Decl->getLocation());
- uint64_t Line = SM.getLogicalLineNumber(Decl->getLocation());
+ unsigned Line = SM.getInstantiationLineNumber(Decl->getLocation());
// Records and classes and unions can all be recursive. To handle them, we
@@ -247,11 +247,11 @@
// Get the location for the field.
SourceLocation FieldDefLoc = Field->getLocation();
llvm::DICompileUnit FieldDefUnit = getOrCreateCompileUnit(FieldDefLoc);
- uint64_t FieldLine = SM.getLogicalLineNumber(FieldDefLoc);
+ unsigned FieldLine = SM.getInstantiationLineNumber(FieldDefLoc);
// Bit size, align and offset of the type.
uint64_t FieldSize = M->getContext().getTypeSize(Ty);
- uint64_t FieldAlign = M->getContext().getTypeAlign(Ty);
+ unsigned FieldAlign = M->getContext().getTypeAlign(Ty);
uint64_t FieldOffset = RL.getFieldOffset(FieldNo);
// Create a DW_TAG_member node to remember the offset of this field in the
@@ -305,11 +305,11 @@
SourceLocation DefLoc = Decl->getLocation();
llvm::DICompileUnit DefUnit = getOrCreateCompileUnit(DefLoc);
SourceManager &SM = M->getContext().getSourceManager();
- uint64_t Line = SM.getLogicalLineNumber(DefLoc);
+ unsigned Line = SM.getInstantiationLineNumber(DefLoc);
// Size and align of the type.
uint64_t Size = M->getContext().getTypeSize(Ty);
- uint64_t Align = M->getContext().getTypeAlign(Ty);
+ unsigned Align = M->getContext().getTypeAlign(Ty);
return DebugFactory.CreateCompositeType(llvm::dwarf::DW_TAG_enumeration_type,
Unit, EnumName, DefUnit, Line,
@@ -428,7 +428,7 @@
// FIXME: Why is this using CurLoc???
llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc);
SourceManager &SM = M->getContext().getSourceManager();
- uint64_t LineNo = SM.getLogicalLineNumber(CurLoc);
+ unsigned LineNo = SM.getInstantiationLineNumber(CurLoc);
llvm::DISubprogram SP =
DebugFactory.CreateSubprogram(Unit, Name, Name, "", Unit, LineNo,
@@ -457,8 +457,8 @@
// Get the appropriate compile unit.
llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc);
- DebugFactory.InsertStopPoint(Unit, SM.getLogicalLineNumber(CurLoc),
- SM.getLogicalColumnNumber(CurLoc),
+ DebugFactory.InsertStopPoint(Unit, SM.getInstantiationLineNumber(CurLoc),
+ SM.getInstantiationColumnNumber(CurLoc),
Builder.GetInsertBlock());
}
@@ -492,7 +492,7 @@
// Get location information.
SourceManager &SM = M->getContext().getSourceManager();
- uint64_t Line = SM.getLogicalLineNumber(Decl->getLocation());
+ unsigned Line = SM.getInstantiationLineNumber(Decl->getLocation());
llvm::DICompileUnit Unit = getOrCreateCompileUnit(Decl->getLocation());
// Create the descriptor for the variable.
@@ -525,7 +525,7 @@
// Create global variable debug descriptor.
llvm::DICompileUnit Unit = getOrCreateCompileUnit(Decl->getLocation());
SourceManager &SM = M->getContext().getSourceManager();
- uint64_t LineNo = SM.getLogicalLineNumber(Decl->getLocation());
+ unsigned LineNo = SM.getInstantiationLineNumber(Decl->getLocation());
std::string Name = Decl->getNameAsString();
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index db6aae6..1acebae 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -125,7 +125,8 @@
if (const AnnotateAttr *AA = D.getAttr<AnnotateAttr>()) {
SourceManager &SM = CGM.getContext().getSourceManager();
llvm::Constant *Ann =
- CGM.EmitAnnotateAttr(GV, AA, SM.getLogicalLineNumber(D.getLocation()));
+ CGM.EmitAnnotateAttr(GV, AA,
+ SM.getInstantiationLineNumber(D.getLocation()));
CGM.AddAnnotation(Ann);
}
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 39611a0..7856b07 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -591,7 +591,7 @@
if (const AnnotateAttr *AA = D->getAttr<AnnotateAttr>()) {
SourceManager &SM = Context.getSourceManager();
AddAnnotation(EmitAnnotateAttr(GV, AA,
- SM.getLogicalLineNumber(D->getLocation())));
+ SM.getInstantiationLineNumber(D->getLocation())));
}
GV->setInitializer(Init);