diff options
Diffstat (limited to 'contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp')
-rw-r--r-- | contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp b/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp index 993fcfa..7773cff 100644 --- a/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp +++ b/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp @@ -25,7 +25,8 @@ using namespace llvm; static cl::opt<int> SmallDataThreshold("hexagon-small-data-threshold", - cl::init(8), cl::Hidden); + cl::init(8), cl::Hidden, + cl::desc("The maximum size of an object in the sdata section")); void HexagonTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM) { @@ -46,6 +47,11 @@ void HexagonTargetObjectFile::Initialize(MCContext &Ctx, static bool IsInSmallSection(uint64_t Size) { return Size > 0 && Size <= (uint64_t)SmallDataThreshold; } + +bool HexagonTargetObjectFile::IsSmallDataEnabled () const { + return SmallDataThreshold > 0; +} + /// IsGlobalInSmallSection - Return true if this global value should be /// placed into small data/bss section. bool HexagonTargetObjectFile::IsGlobalInSmallSection(const GlobalValue *GV, |