diff options
author | Eric Christopher <echristo@gmail.com> | 2012-11-19 22:42:15 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2012-11-19 22:42:15 +0000 |
commit | c4639d6ec2cf1e66d0bbc22db9ec530419b18784 (patch) | |
tree | 8426c55f84c6d9780ba8c7cfc715f09e7a104fd1 /lib/VMCore | |
parent | 0f1c7f6216c4dfdd4593bef077f7e1e082b624f9 (diff) | |
download | external_llvm-c4639d6ec2cf1e66d0bbc22db9ec530419b18784.zip external_llvm-c4639d6ec2cf1e66d0bbc22db9ec530419b18784.tar.gz external_llvm-c4639d6ec2cf1e66d0bbc22db9ec530419b18784.tar.bz2 |
Remove a function argument and propagate const around accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/DebugInfo.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VMCore/DebugInfo.cpp b/lib/VMCore/DebugInfo.cpp index 3029ce2..574d2fe 100644 --- a/lib/VMCore/DebugInfo.cpp +++ b/lib/VMCore/DebugInfo.cpp @@ -793,7 +793,7 @@ bool llvm::isSubprogramContext(const MDNode *Context) { //===----------------------------------------------------------------------===// /// processModule - Process entire module and collect debug info. -void DebugInfoFinder::processModule(Module &M) { +void DebugInfoFinder::processModule(const Module &M) { if (NamedMDNode *CU_Nodes = M.getNamedMetadata("llvm.dbg.cu")) { for (unsigned i = 0, e = CU_Nodes->getNumOperands(); i != e; ++i) { DICompileUnit CU(CU_Nodes->getOperand(i)); @@ -819,11 +819,11 @@ void DebugInfoFinder::processModule(Module &M) { } } - for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - for (Function::iterator FI = (*I).begin(), FE = (*I).end(); FI != FE; ++FI) - for (BasicBlock::iterator BI = (*FI).begin(), BE = (*FI).end(); BI != BE; + for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) + for (Function::const_iterator FI = (*I).begin(), FE = (*I).end(); FI != FE; ++FI) + for (BasicBlock::const_iterator BI = (*FI).begin(), BE = (*FI).end(); BI != BE; ++BI) { - if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI)) + if (const DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI)) processDeclare(DDI); DebugLoc Loc = BI->getDebugLoc(); @@ -927,7 +927,7 @@ void DebugInfoFinder::processSubprogram(DISubprogram SP) { } /// processDeclare - Process DbgDeclareInst. -void DebugInfoFinder::processDeclare(DbgDeclareInst *DDI) { +void DebugInfoFinder::processDeclare(const DbgDeclareInst *DDI) { MDNode *N = dyn_cast<MDNode>(DDI->getVariable()); if (!N) return; |