[lld] r244106 - COFF: Fix bad #includes.

Rui Ueyama ruiu at google.com
Wed Aug 5 12:51:28 PDT 2015


Author: ruiu
Date: Wed Aug  5 14:51:28 2015
New Revision: 244106

URL: http://llvm.org/viewvc/llvm-project?rev=244106&view=rev
Log:
COFF: Fix bad #includes.

Writer.h is intended to be included only by Writer.cpp and Driver.cpp.
Use of the header in other files are bad.

Modified:
    lld/trunk/COFF/Chunks.cpp
    lld/trunk/COFF/Chunks.h
    lld/trunk/COFF/InputFiles.cpp
    lld/trunk/COFF/Writer.h

Modified: lld/trunk/COFF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.cpp?rev=244106&r1=244105&r2=244106&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.cpp (original)
+++ lld/trunk/COFF/Chunks.cpp Wed Aug  5 14:51:28 2015
@@ -9,7 +9,7 @@
 
 #include "Chunks.h"
 #include "InputFiles.h"
-#include "Writer.h"
+#include "Symbols.h"
 #include "llvm/Object/COFF.h"
 #include "llvm/Support/COFF.h"
 #include "llvm/Support/Debug.h"

Modified: lld/trunk/COFF/Chunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.h?rev=244106&r1=244105&r2=244106&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.h (original)
+++ lld/trunk/COFF/Chunks.h Wed Aug  5 14:51:28 2015
@@ -37,6 +37,10 @@ class ObjectFile;
 class OutputSection;
 class SymbolBody;
 
+// Mask for section types (code, data, bss, disacardable, etc.)
+// and permissions (writable, readable or executable).
+const uint32_t PermMask = 0xFF0000F0;
+
 // A Chunk represents a chunk of data that will occupy space in the
 // output (if the resolver chose that). It may or may not be backed by
 // a section of an input file. It could be linker-created data, or

Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=244106&r1=244105&r2=244106&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Wed Aug  5 14:51:28 2015
@@ -10,7 +10,7 @@
 #include "Chunks.h"
 #include "Error.h"
 #include "InputFiles.h"
-#include "Writer.h"
+#include "Symbols.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/LTO/LTOModule.h"
 #include "llvm/Object/COFF.h"

Modified: lld/trunk/COFF/Writer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Writer.h?rev=244106&r1=244105&r2=244106&view=diff
==============================================================================
--- lld/trunk/COFF/Writer.h (original)
+++ lld/trunk/COFF/Writer.h Wed Aug  5 14:51:28 2015
@@ -21,10 +21,6 @@
 namespace lld {
 namespace coff {
 
-// Mask for section types (code, data, bss, disacardable, etc.)
-// and permissions (writable, readable or executable).
-const uint32_t PermMask = 0xFF0000F0;
-
 // Implemented in ICF.cpp.
 void doICF(const std::vector<Chunk *> &Chunks);
 




More information about the llvm-commits mailing list