summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorEric Beckmann <ecbeckmann@google.com>2017-06-29 00:17:26 +0000
committerEric Beckmann <ecbeckmann@google.com>2017-06-29 00:17:26 +0000
commitd40dd64ff09af6f9dab68943492322015b61b24f (patch)
tree95c987439a28ee209a4708644698df6b2712a67f /llvm/include
parent798a19ab8e3a065d5d1be38094288b228a0c039c (diff)
downloadbcm5719-llvm-d40dd64ff09af6f9dab68943492322015b61b24f.tar.gz
bcm5719-llvm-d40dd64ff09af6f9dab68943492322015b61b24f.zip
Revert "Replace trivial use of external rc.exe by writing our own .res file."
This reverts commit d4c7e9fc63c10dbab0c30186ef8575474a704496. This is done in order to address the failure of CrWinClangLLD etc. bots. These throw an error of "side-by-side configuration is incorrect" during compilation, which sounds suspiciously related to these manifest changes. Revert "Switch external cvtres.exe for llvm's own resource library." This reverts commit 71fe8ef283a9dab9a3f21432c98466cbc23990d1. llvm-svn: 306618
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/BinaryFormat/COFF.h6
-rw-r--r--llvm/include/llvm/Object/WindowsResource.h49
2 files changed, 11 insertions, 44 deletions
diff --git a/llvm/include/llvm/BinaryFormat/COFF.h b/llvm/include/llvm/BinaryFormat/COFF.h
index b395db6eaa8..138e44bfec2 100644
--- a/llvm/include/llvm/BinaryFormat/COFF.h
+++ b/llvm/include/llvm/BinaryFormat/COFF.h
@@ -46,12 +46,6 @@ static const char ClGlObjMagic[] = {
'\xac', '\x9b', '\xd6', '\xb6', '\x22', '\x26', '\x53', '\xc2',
};
-// The signature bytes that start a .res file.
-static const char WinResMagic[] = {
- '\x00', '\x00', '\x00', '\x00', '\x20', '\x00', '\x00', '\x00',
- '\xff', '\xff', '\x00', '\x00', '\xff', '\xff', '\x00', '\x00',
-};
-
// Sizes in bytes of various things in the COFF format.
enum {
Header16Size = 20,
diff --git a/llvm/include/llvm/Object/WindowsResource.h b/llvm/include/llvm/Object/WindowsResource.h
index 3d32409fd4a..1ef00e2909f 100644
--- a/llvm/include/llvm/Object/WindowsResource.h
+++ b/llvm/include/llvm/Object/WindowsResource.h
@@ -43,47 +43,12 @@
#include <map>
namespace llvm {
+
namespace object {
class WindowsResource;
-const size_t WIN_RES_MAGIC_SIZE = 16;
-const size_t WIN_RES_NULL_ENTRY_SIZE = 16;
-const uint32_t WIN_RES_HEADER_ALIGNMENT = 4;
-const uint32_t WIN_RES_DATA_ALIGNMENT = 4;
-const uint16_t WIN_RES_PURE_MOVEABLE = 0x0030;
-
-struct WinResHeaderPrefix {
- support::ulittle32_t DataSize;
- support::ulittle32_t HeaderSize;
-};
-
-// Type and Name may each either be an integer ID or a string. This struct is
-// only used in the case where they are both IDs.
-struct WinResIDs {
- uint16_t TypeFlag;
- support::ulittle16_t TypeID;
- uint16_t NameFlag;
- support::ulittle16_t NameID;
-
- void setType(uint16_t ID) {
- TypeFlag = 0xffff;
- TypeID = ID;
- }
-
- void setName(uint16_t ID) {
- NameFlag = 0xffff;
- NameID = ID;
- }
-};
-
-struct WinResHeaderSuffix {
- support::ulittle32_t DataVersion;
- support::ulittle16_t MemoryFlags;
- support::ulittle16_t Language;
- support::ulittle32_t Version;
- support::ulittle32_t Characteristics;
-};
+enum class Machine { UNKNOWN, ARM, X64, X86 };
class ResourceEntryRef {
public:
@@ -108,6 +73,14 @@ private:
Error loadNext();
+ struct HeaderSuffix {
+ support::ulittle32_t DataVersion;
+ support::ulittle16_t MemoryFlags;
+ support::ulittle16_t Language;
+ support::ulittle32_t Version;
+ support::ulittle32_t Characteristics;
+ };
+
BinaryStreamReader Reader;
bool IsStringType;
ArrayRef<UTF16> Type;
@@ -115,7 +88,7 @@ private:
bool IsStringName;
ArrayRef<UTF16> Name;
uint16_t NameID;
- const WinResHeaderSuffix *Suffix = nullptr;
+ const HeaderSuffix *Suffix = nullptr;
ArrayRef<uint8_t> Data;
const WindowsResource *OwningRes = nullptr;
};
OpenPOWER on IntegriCloud