Add missing const specifier to a const method.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 5 Jun 2014 14:32:15 +0000 (14:32 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 5 Jun 2014 14:32:15 +0000 (14:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210265 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/DebugLoc.h
lib/IR/DebugLoc.cpp

index 6d769d4055c836f16a446fe5526c9f7b29aee4f1..3d969a8b7532c411b5dbe058b34158b32e3b7452 100644 (file)
@@ -95,7 +95,7 @@ namespace llvm {
 
     // getFnDebugLoc - Walk up the scope chain of given debug loc and find line
     // number info for the function.
-    DebugLoc getFnDebugLoc(const LLVMContext &Ctx);
+    DebugLoc getFnDebugLoc(const LLVMContext &Ctx) const;
 
     /// getAsMDNode - This method converts the compressed DebugLoc node into a
     /// DILocation compatible MDNode.
index 43360d38662cffbc1c83af68c328b5f9149fa1b5..e8bdccebae96d5445abd9fd103d61466e14055c5 100644 (file)
@@ -76,7 +76,7 @@ MDNode *DebugLoc::getScopeNode(const LLVMContext &Ctx) const {
   return getScope(Ctx);
 }
 
-DebugLoc DebugLoc::getFnDebugLoc(const LLVMContext &Ctx) {
+DebugLoc DebugLoc::getFnDebugLoc(const LLVMContext &Ctx) const {
   const MDNode *Scope = getScopeNode(Ctx);
   DISubprogram SP = getDISubprogram(Scope);
   if (SP.isSubprogram()) {