FAIL* works with LLVM 3.9, 4.0, 5.0 or 6.0
Change-Id: I5480c3451daac7c8ea6160a9afe5ce557b73afb1
This commit is contained in:
@ -4,6 +4,14 @@ using namespace fail;
|
||||
using namespace llvm;
|
||||
using namespace llvm::object;
|
||||
|
||||
// In LLVM 3.9, llvm::Triple::getArchTypeName() returns const char*, since LLVM
|
||||
// 4.0 it returns StringRef. This overload catches the latter case.
|
||||
__attribute__((unused))
|
||||
static std::ostream& operator<<(std::ostream& stream, const llvm::StringRef& s)
|
||||
{
|
||||
stream << s.str();
|
||||
return stream;
|
||||
}
|
||||
|
||||
LLVMtoFailTranslator *LLVMDisassembler::getTranslator() {
|
||||
if (ltofail == 0) {
|
||||
|
||||
@ -23,7 +23,6 @@
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
#include "llvm/Support/TargetSelect.h"
|
||||
#include "llvm/Support/MemoryObject.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user