projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Const-correct and prevent a copy of a SmallPtrSet.
[oota-llvm.git]
/
lib
/
MC
/
MCAsmBackend.cpp
diff --git
a/lib/MC/MCAsmBackend.cpp
b/lib/MC/MCAsmBackend.cpp
index 936ed55e54d3cbdd55d75ec718e40e0dc6857084..c42757b70c8ba9f09fe6b188bcc964397201251f 100644
(file)
--- a/
lib/MC/MCAsmBackend.cpp
+++ b/
lib/MC/MCAsmBackend.cpp
@@
-8,15
+8,13
@@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCAsmBackend.h"
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCAsmBackend.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/MC/MCFixupKindInfo.h"
using namespace llvm;
using namespace llvm;
-MCAsmBackend::MCAsmBackend()
- : HasReliableSymbolDifference(false)
-{
-}
+MCAsmBackend::MCAsmBackend() : HasDataInCodeSupport(false) {}
-MCAsmBackend::~MCAsmBackend() {
-}
+MCAsmBackend::~MCAsmBackend() {}
const MCFixupKindInfo &
MCAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
const MCFixupKindInfo &
MCAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
@@
-32,10
+30,13
@@
MCAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
{ "FK_GPRel_1", 0, 8, 0 },
{ "FK_GPRel_2", 0, 16, 0 },
{ "FK_GPRel_4", 0, 32, 0 },
{ "FK_GPRel_1", 0, 8, 0 },
{ "FK_GPRel_2", 0, 16, 0 },
{ "FK_GPRel_4", 0, 32, 0 },
- { "FK_GPRel_8", 0, 64, 0 }
+ { "FK_GPRel_8", 0, 64, 0 },
+ { "FK_SecRel_1", 0, 8, 0 },
+ { "FK_SecRel_2", 0, 16, 0 },
+ { "FK_SecRel_4", 0, 32, 0 },
+ { "FK_SecRel_8", 0, 64, 0 }
};
};
-
- assert((size_t)Kind <= sizeof(Builtins) / sizeof(Builtins[0]) &&
- "Unknown fixup kind");
+
+ assert((size_t)Kind <= array_lengthof(Builtins) && "Unknown fixup kind");
return Builtins[Kind];
}
return Builtins[Kind];
}