summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-30 02:20:07 +0000
committerChris Lattner <sabre@nondot.org>2009-12-30 02:20:07 +0000
commit95471e49c55f7d01b86b9a72cbe11e9b6b20f2e4 (patch)
tree642a0ef291f6a6851b0b1bc0cf68973c772c49d6 /llvm/lib/AsmParser
parent5b4a962bddc931494bf3b1dbb9758a8978a82777 (diff)
downloadbcm5719-llvm-95471e49c55f7d01b86b9a72cbe11e9b6b20f2e4.tar.gz
bcm5719-llvm-95471e49c55f7d01b86b9a72cbe11e9b6b20f2e4.zip
remove the code added in r90497. It has several major issues and no tests.
llvm-svn: 92288
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp43
-rw-r--r--llvm/lib/AsmParser/LLParser.h2
2 files changed, 2 insertions, 43 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index e76232db142..db2a5a92ab9 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -568,37 +568,6 @@ bool LLParser::ParseStandaloneMetadata() {
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 @@ bool LLParser::ParseParameterList(SmallVectorImpl<ParamInfo> &ArgList,
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 @@ bool LLParser::ConvertValIDToValue(const Type *Ty, ValID &ID, Value *&V,
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);
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index fd7bf4eb71f..31707287913 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -283,8 +283,6 @@ namespace llvm {
return ParseTypeAndBasicBlock(BB, Loc, PFS);
}
- bool ParseInlineMetadata(Value *&V, PerFunctionState &PFS);
-
struct ParamInfo {
LocTy Loc;
Value *V;
OpenPOWER on IntegriCloud