summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaStmtAsm.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-11 21:28:29 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-11 21:28:29 +0000
commite66f42634fac5eeac7de52ed87af2cad2117e046 (patch)
treef94387fd15923a1cb511a586d63c98790b351420 /clang/lib/Sema/SemaStmtAsm.cpp
parent0c61134d8d00b38f5f09233957317b23a408bd55 (diff)
downloadbcm5719-llvm-e66f42634fac5eeac7de52ed87af2cad2117e046.tar.gz
bcm5719-llvm-e66f42634fac5eeac7de52ed87af2cad2117e046.zip
[ms-inline asm] Lookup the IdentifierInfo using the Idents table and remove the
now unused static helper function. The test case needs to be remove temporarily until I can better filter memory operands that aren't actual variable reference. llvm-svn: 165751
Diffstat (limited to 'clang/lib/Sema/SemaStmtAsm.cpp')
-rw-r--r--clang/lib/Sema/SemaStmtAsm.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp
index 3c3a9eb0b5c..9b6b6c929c0 100644
--- a/clang/lib/Sema/SemaStmtAsm.cpp
+++ b/clang/lib/Sema/SemaStmtAsm.cpp
@@ -353,19 +353,6 @@ static StringRef getMSInlineAsmExprName(StringRef Name) {
return Name;
}
-// getIdentifierInfo - Given a Name and a range of tokens, find the associated
-// IdentifierInfo*.
-static IdentifierInfo *getIdentifierInfo(StringRef Name,
- ArrayRef<Token> AsmToks,
- unsigned Begin, unsigned End) {
- for (unsigned i = Begin; i <= End; ++i) {
- IdentifierInfo *II = AsmToks[i].getIdentifierInfo();
- if (II && II->getName() == Name)
- return II;
- }
- return 0;
-}
-
// getSpelling - Get the spelling of the AsmTok token.
static StringRef getSpelling(Sema &SemaRef, Token AsmTok) {
StringRef Asm;
@@ -624,10 +611,7 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc,
if (Context.getTargetInfo().isValidGCCRegisterName(Name))
continue;
- IdentifierInfo *II = getIdentifierInfo(Name, AsmToks,
- AsmTokRanges[StrIdx].first,
- AsmTokRanges[StrIdx].second);
- if (II) {
+ if (IdentifierInfo *II = &Context.Idents.get(Name)) {
CXXScopeSpec SS;
UnqualifiedId Id;
SourceLocation Loc;
OpenPOWER on IntegriCloud