diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-28 21:57:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-28 21:57:50 +0000 |
commit | d0cfbae8c9bf7ee40e77257668dedce1611e78ed (patch) | |
tree | 48b4e3985ca5c796508a17a7578ea5994659b10b /llvm/lib/AsmParser/ParserInternals.h | |
parent | 0ebb7930c9974e04b10e2787487227d0e677c3f3 (diff) | |
download | bcm5719-llvm-d0cfbae8c9bf7ee40e77257668dedce1611e78ed.tar.gz bcm5719-llvm-d0cfbae8c9bf7ee40e77257668dedce1611e78ed.zip |
Remove dead code
llvm-svn: 2390
Diffstat (limited to 'llvm/lib/AsmParser/ParserInternals.h')
-rw-r--r-- | llvm/lib/AsmParser/ParserInternals.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/AsmParser/ParserInternals.h b/llvm/lib/AsmParser/ParserInternals.h index db84f92f7b0..3571138a0d2 100644 --- a/llvm/lib/AsmParser/ParserInternals.h +++ b/llvm/lib/AsmParser/ParserInternals.h @@ -64,8 +64,7 @@ static inline void ThrowException(const std::string &message, // struct ValID { enum { - NumberVal, NameVal, ConstSIntVal, ConstUIntVal, ConstStringVal, - ConstFPVal, ConstNullVal + NumberVal, NameVal, ConstSIntVal, ConstUIntVal, ConstFPVal, ConstNullVal } Type; union { @@ -92,10 +91,6 @@ struct ValID { ValID D; D.Type = ConstUIntVal; D.UConstPool64 = Val; return D; } - static ValID create_conststr(char *Name) { - ValID D; D.Type = ConstStringVal; D.Name = Name; return D; - } - static ValID create(double Val) { ValID D; D.Type = ConstFPVal; D.ConstPoolFP = Val; return D; } @@ -105,12 +100,12 @@ struct ValID { } inline void destroy() const { - if (Type == NameVal || Type == ConstStringVal) + if (Type == NameVal) free(Name); // Free this strdup'd memory... } inline ValID copy() const { - if (Type != NameVal && Type != ConstStringVal) return *this; + if (Type != NameVal) return *this; ValID Result = *this; Result.Name = strdup(Name); return Result; @@ -120,7 +115,6 @@ struct ValID { switch (Type) { case NumberVal : return std::string("#") + itostr(Num); case NameVal : return Name; - case ConstStringVal: return std::string("\"") + Name + std::string("\""); case ConstFPVal : return ftostr(ConstPoolFP); case ConstNullVal : return "null"; case ConstUIntVal : @@ -136,7 +130,6 @@ struct ValID { if (Type != V.Type) return Type < V.Type; switch (Type) { case NumberVal: return Num < V.Num; - case ConstStringVal: case NameVal: return strcmp(Name, V.Name) < 0; case ConstSIntVal: return ConstPool64 < V.ConstPool64; case ConstUIntVal: return UConstPool64 < V.UConstPool64; |