mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Final step in the metadata API restructuring: move the
getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Analysis/DebugInfo.h"
|
||||
@@ -220,9 +219,8 @@ static bool StripDebugInfo(Module &M) {
|
||||
Changed = true;
|
||||
NMD->eraseFromParent();
|
||||
}
|
||||
MetadataContext &TheMetadata = M.getContext().getMetadata();
|
||||
unsigned MDDbgKind = TheMetadata.getMDKindID("dbg");
|
||||
|
||||
|
||||
unsigned MDDbgKind = M.getMDKindID("dbg");
|
||||
for (Module::iterator MI = M.begin(), ME = M.end(); MI != ME; ++MI)
|
||||
for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE;
|
||||
++FI)
|
||||
|
@@ -420,8 +420,7 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
|
||||
//
|
||||
BasicBlock::iterator I = NewBB->begin();
|
||||
|
||||
// FIXME: Only use of context.
|
||||
unsigned DbgKind = OldFunc->getContext().getMetadata().getMDKindID("dbg");
|
||||
unsigned DbgKind = OldFunc->getContext().getMDKindID("dbg");
|
||||
MDNode *TheCallMD = NULL;
|
||||
SmallVector<Value *, 4> MDVs;
|
||||
if (TheCall && TheCall->hasMetadata())
|
||||
|
Reference in New Issue
Block a user