[llvm] b9a8e78 - Parser.h/cpp - cleanup includes and forward declaration. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 05:15:48 PDT 2020


Author: Simon Pilgrim
Date: 2020-04-16T13:15:32+01:00
New Revision: b9a8e787ae4e178b0fb0ac578ba6b7c96d419ba9

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

LOG: Parser.h/cpp - cleanup includes and forward declaration. NFC.
Parser.h - Reduce MemoryBuffer.h include to just the necessary StringRef.h include and MemoryBufferRef forward declaration
Parser.cpp - Remove unused raw_ostream.h include

Added: 
    

Modified: 
    llvm/include/llvm/AsmParser/Parser.h
    llvm/lib/AsmParser/Parser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/AsmParser/Parser.h b/llvm/include/llvm/AsmParser/Parser.h
index b0c603497805..28a0a479cc3a 100644
--- a/llvm/include/llvm/AsmParser/Parser.h
+++ b/llvm/include/llvm/AsmParser/Parser.h
@@ -13,12 +13,14 @@
 #ifndef LLVM_ASMPARSER_PARSER_H
 #define LLVM_ASMPARSER_PARSER_H
 
-#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/ADT/StringRef.h"
+#include <memory>
 
 namespace llvm {
 
 class Constant;
 class LLVMContext;
+class MemoryBufferRef;
 class Module;
 class ModuleSummaryIndex;
 struct SlotMapping;

diff  --git a/llvm/lib/AsmParser/Parser.cpp b/llvm/lib/AsmParser/Parser.cpp
index b7f552a6fccb..7f4283218ab3 100644
--- a/llvm/lib/AsmParser/Parser.cpp
+++ b/llvm/lib/AsmParser/Parser.cpp
@@ -17,9 +17,9 @@
 #include "llvm/IR/ModuleSummaryIndex.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/SourceMgr.h"
-#include "llvm/Support/raw_ostream.h"
 #include <cstring>
 #include <system_error>
+
 using namespace llvm;
 
 bool llvm::parseAssemblyInto(MemoryBufferRef F, Module *M,


        


More information about the llvm-commits mailing list