mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-06 01:27:08 +00:00
[DIBuilder] Remove dead code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4e53350f9
commit
cced733fa5
@ -24,40 +24,6 @@
|
||||
using namespace llvm;
|
||||
using namespace llvm::dwarf;
|
||||
|
||||
namespace {
|
||||
class HeaderBuilder {
|
||||
/// \brief Whether there are any fields yet.
|
||||
///
|
||||
/// Note that this is not equivalent to \c Chars.empty(), since \a concat()
|
||||
/// may have been called already with an empty string.
|
||||
bool IsEmpty;
|
||||
SmallVector<char, 256> Chars;
|
||||
|
||||
public:
|
||||
HeaderBuilder() : IsEmpty(true) {}
|
||||
HeaderBuilder(const HeaderBuilder &X) : IsEmpty(X.IsEmpty), Chars(X.Chars) {}
|
||||
HeaderBuilder(HeaderBuilder &&X)
|
||||
: IsEmpty(X.IsEmpty), Chars(std::move(X.Chars)) {}
|
||||
|
||||
template <class Twineable> HeaderBuilder &concat(Twineable &&X) {
|
||||
if (IsEmpty)
|
||||
IsEmpty = false;
|
||||
else
|
||||
Chars.push_back(0);
|
||||
Twine(X).toVector(Chars);
|
||||
return *this;
|
||||
}
|
||||
|
||||
MDString *get(LLVMContext &Context) const {
|
||||
return MDString::get(Context, StringRef(Chars.begin(), Chars.size()));
|
||||
}
|
||||
|
||||
static HeaderBuilder get(unsigned Tag) {
|
||||
return HeaderBuilder().concat("0x" + Twine::utohexstr(Tag));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
DIBuilder::DIBuilder(Module &m, bool AllowUnresolvedNodes)
|
||||
: M(m), VMContext(M.getContext()), CUNode(nullptr),
|
||||
DeclareFn(nullptr), ValueFn(nullptr),
|
||||
|
Loading…
x
Reference in New Issue
Block a user