mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-27 15:29:51 +00:00
clean up some really strange code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92275 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
442ffa1c56
commit
42991eeb64
@ -492,11 +492,12 @@ bool LLParser::ParseMDNode(MDNode *&Result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create MDNode forward reference
|
||||
// Create MDNode forward reference.
|
||||
|
||||
// FIXME: This is not unique enough!
|
||||
std::string FwdRefName = "llvm.mdnode.fwdref." + utostr(MID);
|
||||
SmallVector<Value *, 1> Elts;
|
||||
Elts.push_back(MDString::get(Context, FwdRefName));
|
||||
MDNode *FwdNode = MDNode::get(Context, Elts.data(), Elts.size());
|
||||
Value *V = MDString::get(Context, FwdRefName));
|
||||
MDNode *FwdNode = MDNode::get(Context, &V, 1);
|
||||
ForwardRefMDNodes[MID] = std::make_pair(FwdNode, Lex.getLoc());
|
||||
Result = FwdNode;
|
||||
return false;
|
||||
@ -521,12 +522,11 @@ bool LLParser::ParseNamedMetadata() {
|
||||
Lex.Lex();
|
||||
SmallVector<MetadataBase *, 8> Elts;
|
||||
do {
|
||||
// FIXME: Eat if present.
|
||||
if (Lex.getKind() != lltok::Metadata)
|
||||
return TokError("Expected '!' here");
|
||||
if (ParseToken(lltok::Metadata, "Expected '!' here"))
|
||||
return true;
|
||||
Lex.Lex();
|
||||
|
||||
// FIXME: Will crash on mdstrings etc.
|
||||
// FIXME: This rejects MDStrings. Are they legal in an named MDNode or not?
|
||||
MDNode *N = 0;
|
||||
if (ParseMDNode(N)) return true;
|
||||
Elts.push_back(N);
|
||||
|
Loading…
Reference in New Issue
Block a user