[llvm] 5b4744b - Make sure that llvm-ml uses MASM integer lexing when in --as-lex mode

Eric Astor via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 13:03:16 PDT 2020


Author: Eric Astor
Date: 2020-09-02T16:03:01-04:00
New Revision: 5b4744b2c5af7b4ee564eacf81f812f371c52683

URL: https://github.com/llvm/llvm-project/commit/5b4744b2c5af7b4ee564eacf81f812f371c52683
DIFF: https://github.com/llvm/llvm-project/commit/5b4744b2c5af7b4ee564eacf81f812f371c52683.diff

LOG: Make sure that llvm-ml uses MASM integer lexing when in --as-lex mode

Added: 
    

Modified: 
    llvm/tools/llvm-ml/llvm-ml.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-ml/llvm-ml.cpp b/llvm/tools/llvm-ml/llvm-ml.cpp
index 2d4a3afdc1f9..5abf22d6d6dd 100644
--- a/llvm/tools/llvm-ml/llvm-ml.cpp
+++ b/llvm/tools/llvm-ml/llvm-ml.cpp
@@ -175,6 +175,7 @@ static std::unique_ptr<ToolOutputFile> GetOutputStream(StringRef Path) {
 static int AsLexInput(SourceMgr &SrcMgr, MCAsmInfo &MAI, raw_ostream &OS) {
   AsmLexer Lexer(MAI);
   Lexer.setBuffer(SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID())->getBuffer());
+  Lexer.setLexMasmIntegers(true);
 
   bool Error = false;
   while (Lexer.Lex().isNot(AsmToken::Eof)) {


        


More information about the llvm-commits mailing list