[llvm] r294051 - [XCore] Fix some Include What You Use warnings; other minor fixes (NFC).

Eugene Zelenko via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 13:46:55 PST 2017


Author: eugenezelenko
Date: Fri Feb  3 15:46:55 2017
New Revision: 294051

URL: http://llvm.org/viewvc/llvm-project?rev=294051&view=rev
Log:
[XCore] Fix some Include What You Use warnings; other minor fixes (NFC).

This is preparation to reduce MCExpr.h dependencies.

Modified:
    llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp
    llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.h

Modified: llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp?rev=294051&r1=294050&r2=294051&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp Fri Feb  3 15:46:55 2017
@@ -12,13 +12,15 @@
 //===----------------------------------------------------------------------===//
 
 #include "XCoreInstPrinter.h"
-#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/StringRef.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
-#include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCSymbol.h"
+#include "llvm/Support/Casting.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
+#include <cassert>
+
 using namespace llvm;
 
 #define DEBUG_TYPE "asm-printer"

Modified: llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.h?rev=294051&r1=294050&r2=294051&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.h (original)
+++ llvm/trunk/lib/Target/XCore/InstPrinter/XCoreInstPrinter.h Fri Feb  3 15:46:55 2017
@@ -15,6 +15,8 @@
 
 #ifndef LLVM_LIB_TARGET_XCORE_INSTPRINTER_XCOREINSTPRINTER_H
 #define LLVM_LIB_TARGET_XCORE_INSTPRINTER_XCOREINSTPRINTER_H
+
+#include "llvm/ADT/StringRef.h"
 #include "llvm/MC/MCInstPrinter.h"
 
 namespace llvm {
@@ -32,12 +34,14 @@ public:
   void printRegName(raw_ostream &OS, unsigned RegNo) const override;
   void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot,
                  const MCSubtargetInfo &STI) override;
+
 private:
   void printInlineJT(const MCInst *MI, int opNum, raw_ostream &O);
   void printInlineJT32(const MCInst *MI, int opNum, raw_ostream &O);
   void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
   void printMemOperand(const MCInst *MI, int opNum, raw_ostream &O);
 };
+
 } // end namespace llvm
 
-#endif
+#endif // LLVM_LIB_TARGET_XCORE_INSTPRINTER_XCOREINSTPRINTER_H




More information about the llvm-commits mailing list