[llvm-commits] [llvm] r127258 - /llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp

Jim Grosbach grosbach at apple.com
Tue Mar 8 11:17:19 PST 2011


Author: grosbach
Date: Tue Mar  8 13:17:19 2011
New Revision: 127258

URL: http://llvm.org/viewvc/llvm-project?rev=127258&view=rev
Log:
Darwin 'as' silently ignores the '.ident' directive.

Modified:
    llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp

Modified: llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp?rev=127258&r1=127257&r2=127258&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp Tue Mar  8 13:17:19 2011
@@ -100,6 +100,8 @@
     AddDirectiveHandler<&DarwinAsmParser::ParseSectionDirectiveText>(".text");
     AddDirectiveHandler<&DarwinAsmParser::ParseSectionDirectiveThreadInitFunc>(".thread_init_func");
     AddDirectiveHandler<&DarwinAsmParser::ParseSectionDirectiveTLV>(".tlv");
+
+    AddDirectiveHandler<&DarwinAsmParser::ParseSectionDirectiveIdent>(".ident");
   }
 
   bool ParseDirectiveDesc(StringRef, SMLoc);
@@ -277,6 +279,11 @@
     return ParseSectionSwitch("__DATA", "__thread_vars",
                               MCSectionMachO::S_THREAD_LOCAL_VARIABLES);
   }
+  bool ParseSectionDirectiveIdent(StringRef, SMLoc) {
+    // Darwin silently ignores the .ident directive.
+    getParser().EatToEndOfStatement();
+    return false;
+  }
   bool ParseSectionDirectiveThreadInitFunc(StringRef, SMLoc) {
     return ParseSectionSwitch("__DATA", "__thread_init",
                          MCSectionMachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS);





More information about the llvm-commits mailing list