[llvm-commits] [llvm] r92288 - in /llvm/trunk/lib/AsmParser: LLParser.cpp LLParser.h
Chris Lattner
sabre at nondot.org
Tue Dec 29 18:20:07 PST 2009
Author: lattner
Date: Tue Dec 29 20:20:07 2009
New Revision: 92288
URL: http://llvm.org/viewvc/llvm-project?rev=92288&view=rev
Log:
remove the code added in r90497. It has several major issues and no tests.
Modified:
llvm/trunk/lib/AsmParser/LLParser.cpp
llvm/trunk/lib/AsmParser/LLParser.h
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=92288&r1=92287&r2=92288&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Tue Dec 29 20:20:07 2009
@@ -568,37 +568,6 @@
return false;
}
-/// ParseInlineMetadata:
-/// !{type %instr}
-/// !{...} MDNode
-/// !"foo" MDString
-bool LLParser::ParseInlineMetadata(Value *&V, PerFunctionState &PFS) {
- assert(Lex.getKind() == lltok::Metadata && "Only for Metadata");
- V = 0;
-
- Lex.Lex();
- if (EatIfPresent(lltok::lbrace)) {
- if (ParseTypeAndValue(V, PFS) ||
- ParseToken(lltok::rbrace, "expected end of metadata node"))
- return true;
-
- V = MDNode::get(Context, &V, 1);
- return false;
- }
-
- // FIXME: This can't possibly work at all. r90497
-
- // Standalone metadata reference
- // !{ ..., !42, ... }
- if (!ParseMDNode((MDNode *&)V))
- return false;
-
- // MDString:
- // '!' STRINGCONSTANT
- if (ParseMDString((MDString *&)V)) return true;
- return false;
-}
-
/// ParseAlias:
/// ::= GlobalVar '=' OptionalVisibility 'alias' OptionalLinkage Aliasee
/// Aliasee
@@ -1408,14 +1377,6 @@
if (ParseType(ArgTy, ArgLoc))
return true;
- // Parse metadata operands to calls (for intrinsics).
- if (Lex.getKind() == lltok::Metadata) {
- if (ParseInlineMetadata(V, PFS))
- return true;
- ArgList.push_back(ParamInfo(ArgLoc, V, Attribute::None));
- continue;
- }
-
// Otherwise, handle normal operands.
if (ParseOptionalAttrs(ArgAttrs1, 0) ||
ParseValue(ArgTy, V, PFS) ||
@@ -2515,8 +2476,8 @@
case ValID::t_MDString: V = ID.MDStringVal;
case ValID::t_InlineAsm: {
const PointerType *PTy = dyn_cast<PointerType>(Ty);
- const FunctionType *FTy =
- PTy ? dyn_cast<FunctionType>(PTy->getElementType()) : 0;
+ const FunctionType *FTy =
+ PTy ? dyn_cast<FunctionType>(PTy->getElementType()) : 0;
if (!FTy || !InlineAsm::Verify(FTy, ID.StrVal2))
return Error(ID.Loc, "invalid type for inline asm constraint string");
V = InlineAsm::get(FTy, ID.StrVal, ID.StrVal2, ID.UIntVal&1, ID.UIntVal>>1);
Modified: llvm/trunk/lib/AsmParser/LLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.h?rev=92288&r1=92287&r2=92288&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.h (original)
+++ llvm/trunk/lib/AsmParser/LLParser.h Tue Dec 29 20:20:07 2009
@@ -283,8 +283,6 @@
return ParseTypeAndBasicBlock(BB, Loc, PFS);
}
- bool ParseInlineMetadata(Value *&V, PerFunctionState &PFS);
-
struct ParamInfo {
LocTy Loc;
Value *V;
More information about the llvm-commits
mailing list