mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
shrinking down #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
SymTabIdx(0) {}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user