mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-15 09:33:39 +00:00
Clean up file, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89974 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5bda3792b4
commit
2353122a3c
@ -33,10 +33,8 @@ MDString *MDString::get(LLVMContext &Context, StringRef Str) {
|
||||
StringMapEntry<MDString *> &Entry =
|
||||
pImpl->MDStringCache.GetOrCreateValue(Str);
|
||||
MDString *&S = Entry.getValue();
|
||||
if (S) return S;
|
||||
|
||||
return S =
|
||||
new MDString(Context, Entry.getKey());
|
||||
if (!S) S = new MDString(Context, Entry.getKey());
|
||||
return S;
|
||||
}
|
||||
|
||||
MDString *MDString::get(LLVMContext &Context, const char *Str) {
|
||||
@ -44,10 +42,8 @@ MDString *MDString::get(LLVMContext &Context, const char *Str) {
|
||||
StringMapEntry<MDString *> &Entry =
|
||||
pImpl->MDStringCache.GetOrCreateValue(Str ? StringRef(Str) : StringRef());
|
||||
MDString *&S = Entry.getValue();
|
||||
if (S) return S;
|
||||
|
||||
return S =
|
||||
new MDString(Context, Entry.getKey());
|
||||
if (!S) new MDString(Context, Entry.getKey());
|
||||
return S;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -74,28 +70,19 @@ MDNode *MDNode::get(LLVMContext &Context, Value*const* Vals, unsigned NumVals) {
|
||||
ID.AddPointer(Vals[i]);
|
||||
|
||||
void *InsertPoint;
|
||||
MDNode *N;
|
||||
{
|
||||
N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);
|
||||
}
|
||||
if (N) return N;
|
||||
|
||||
N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);
|
||||
MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);
|
||||
if (!N) {
|
||||
// InsertPoint will have been set by the FindNodeOrInsertPos call.
|
||||
N = new MDNode(Context, Vals, NumVals);
|
||||
pImpl->MDNodeSet.InsertNode(N, InsertPoint);
|
||||
}
|
||||
|
||||
return N;
|
||||
}
|
||||
|
||||
/// ~MDNode - Destroy MDNode.
|
||||
MDNode::~MDNode() {
|
||||
{
|
||||
LLVMContextImpl *pImpl = getType()->getContext().pImpl;
|
||||
pImpl->MDNodeSet.RemoveNode(this);
|
||||
}
|
||||
delete [] Node;
|
||||
Node = NULL;
|
||||
}
|
||||
@ -241,7 +228,7 @@ public:
|
||||
/// the same metadata to In2.
|
||||
void copyMD(Instruction *In1, Instruction *In2);
|
||||
|
||||
/// getHandlerNames - Populate client supplied smallvector using custome
|
||||
/// getHandlerNames - Populate client-supplied smallvector using custom
|
||||
/// metadata name and ID.
|
||||
void getHandlerNames(SmallVectorImpl<std::pair<unsigned, StringRef> >&) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user