diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-07-02 18:29:24 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-07-02 18:29:24 +0000 |
commit | 6dca2847d98f806d7f1af3457a6b5ba59ee21ceb (patch) | |
tree | 61631f0121b04f4973f1e0d61581cec968daee74 /llvm/lib/CodeGen/ELF.h | |
parent | 9fa077c6263be3379eb7650dbec02feb6395330c (diff) | |
download | bcm5719-llvm-6dca2847d98f806d7f1af3457a6b5ba59ee21ceb.tar.gz bcm5719-llvm-6dca2847d98f806d7f1af3457a6b5ba59ee21ceb.zip |
shrinking down #includes
llvm-svn: 74718
Diffstat (limited to 'llvm/lib/CodeGen/ELF.h')
-rw-r--r-- | llvm/lib/CodeGen/ELF.h | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/llvm/lib/CodeGen/ELF.h b/llvm/lib/CodeGen/ELF.h index 8d92373b713..7e983a4d051 100644 --- a/llvm/lib/CodeGen/ELF.h +++ b/llvm/lib/CodeGen/ELF.h @@ -20,14 +20,12 @@ #ifndef CODEGEN_ELF_H #define CODEGEN_ELF_H -#include "llvm/GlobalVariable.h" #include "llvm/CodeGen/BinaryObject.h" #include "llvm/CodeGen/MachineRelocation.h" #include "llvm/Support/DataTypes.h" -#include <cstring> namespace llvm { - class BinaryObject; + class GlobalValue; // Identification Indexes enum { @@ -172,41 +170,25 @@ namespace llvm { IsConstant(false), NameIdx(0), Value(0), Size(0), Info(0), Other(STV_DEFAULT), SectionIdx(ELFSection::SHN_UNDEF), - SymTabIdx(0) { - if (!GV) - return; - - switch (GV->getVisibility()) { - default: - assert(0 && "unknown visibility type"); - case GlobalValue::DefaultVisibility: - Other = STV_DEFAULT; - break; - case GlobalValue::HiddenVisibility: - Other = STV_HIDDEN; - break; - case GlobalValue::ProtectedVisibility: - Other = STV_PROTECTED; - break; - } - } - - unsigned getBind() { - return (Info >> 4) & 0xf; - } + SymTabIdx(0) {} - unsigned getType() { - return Info & 0xf; - } + unsigned getBind() { return (Info >> 4) & 0xf; } + unsigned getType() { return Info & 0xf; } void setBind(unsigned X) { assert(X == (X & 0xF) && "Bind value out of range!"); Info = (Info & 0x0F) | (X << 4); } + void setType(unsigned X) { assert(X == (X & 0xF) && "Type value out of range!"); Info = (Info & 0xF0) | X; } + + void setVisibility(unsigned V) { + assert(V == (V & 0x3) && "Type value out of range!"); + Other = V; + } }; /// ELFRelocation - This class contains all the information necessary to |