diff options
author | Shih-wei Liao <sliao@google.com> | 2012-03-24 04:18:09 -0700 |
---|---|---|
committer | Shih-wei Liao <sliao@google.com> | 2012-03-24 04:18:09 -0700 |
commit | c59a7995d22e2889706810c90a20a51ecfec278b (patch) | |
tree | ef37472f01d4b6258755680b4561a667bc337dd6 /tools | |
parent | d1acd051dd8446a013b6c35b4bfe64ec68417206 (diff) | |
parent | 98a92d199ce9993dca1b65927009013ad3e5297f (diff) | |
download | external_llvm-c59a7995d22e2889706810c90a20a51ecfec278b.zip external_llvm-c59a7995d22e2889706810c90a20a51ecfec278b.tar.gz external_llvm-c59a7995d22e2889706810c90a20a51ecfec278b.tar.bz2 |
Merge branch 'upstream' into sliao_d
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bugpoint/OptimizerDriver.cpp | 12 | ||||
-rw-r--r-- | tools/lli/CMakeLists.txt | 17 | ||||
-rw-r--r-- | tools/lli/Makefile | 17 | ||||
-rw-r--r-- | tools/lli/lli.cpp | 7 | ||||
-rw-r--r-- | tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp | 96 | ||||
-rw-r--r-- | tools/llvm-diff/DifferenceEngine.cpp | 14 | ||||
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 3 | ||||
-rw-r--r-- | tools/llvm-nm/llvm-nm.cpp | 5 | ||||
-rw-r--r-- | tools/llvm-objdump/llvm-objdump.cpp | 16 | ||||
-rw-r--r-- | tools/llvm-readobj/llvm-readobj.cpp | 40 | ||||
-rw-r--r-- | tools/llvm-rtdyld/llvm-rtdyld.cpp | 20 |
11 files changed, 149 insertions, 98 deletions
diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp index 336c83d..fb090ee 100644 --- a/tools/bugpoint/OptimizerDriver.cpp +++ b/tools/bugpoint/OptimizerDriver.cpp @@ -85,8 +85,11 @@ void BugDriver::EmitProgressBitcode(const Module *M, if (NoFlyer || PassesToRun.empty()) return; outs() << "\n*** You can reproduce the problem with: "; if (UseValgrind) outs() << "valgrind "; - outs() << "opt " << Filename << " "; - outs() << getPassesString(PassesToRun) << "\n"; + outs() << "opt " << Filename; + for (unsigned i = 0, e = PluginLoader::getNumPlugins(); i != e; ++i) { + outs() << " -load " << PluginLoader::getPlugin(i); + } + outs() << " " << getPassesString(PassesToRun) << "\n"; } cl::opt<bool> SilencePasses("silence-passes", @@ -145,10 +148,9 @@ bool BugDriver::runPasses(Module *Program, return 1; } - sys::Path tool = PrependMainExecutablePath("opt", getToolName(), - (void*)"opt"); + sys::Path tool = sys::Program::FindProgramByName("opt"); if (tool.empty()) { - errs() << "Cannot find `opt' in executable directory!\n"; + errs() << "Cannot find `opt' in PATH!\n"; return 1; } diff --git a/tools/lli/CMakeLists.txt b/tools/lli/CMakeLists.txt index 9378ef2..a5d2e61 100644 --- a/tools/lli/CMakeLists.txt +++ b/tools/lli/CMakeLists.txt @@ -1,5 +1,22 @@ + +link_directories( ${LLVM_INTEL_JITEVENTS_LIBDIR} ) + set(LLVM_LINK_COMPONENTS mcjit jit interpreter nativecodegen bitreader asmparser selectiondag) +if( LLVM_USE_OPROFILE ) + set(LLVM_LINK_COMPONENTS + ${LLVM_LINK_COMPONENTS} + OProfileJIT + ) +endif( LLVM_USE_OPROFILE ) + +if( LLVM_USE_INTEL_JITEVENTS ) + set(LLVM_LINK_COMPONENTS + ${LLVM_LINK_COMPONENTS} + IntelJITEvents + ) +endif( LLVM_USE_INTEL_JITEVENTS ) + add_llvm_tool(lli lli.cpp ) diff --git a/tools/lli/Makefile b/tools/lli/Makefile index 292f608..100fc2e 100644 --- a/tools/lli/Makefile +++ b/tools/lli/Makefile @@ -9,6 +9,21 @@ LEVEL := ../.. TOOLNAME := lli + +include $(LEVEL)/Makefile.config + LINK_COMPONENTS := mcjit jit interpreter nativecodegen bitreader asmparser selectiondag -include $(LEVEL)/Makefile.common +# If Intel JIT Events support is confiured, link against the LLVM Intel JIT +# Events interface library +ifeq ($(USE_INTEL_JITEVENTS), 1) + LINK_COMPONENTS += inteljitevents +endif + +# If oprofile support is confiured, link against the LLVM oprofile interface +# library +ifeq ($(USE_OPROFILE), 1) + LINK_COMPONENTS += oprofilejit +endif + +include $(LLVM_SRC_ROOT)/Makefile.rules diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 0e8d1d8..efcc1f5 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -238,7 +238,12 @@ int main(int argc, char **argv, char * const *envp) { exit(1); } - EE->RegisterJITEventListener(createOProfileJITEventListener()); + // The following functions have no effect if their respective profiling + // support wasn't enabled in the build configuration. + EE->RegisterJITEventListener( + JITEventListener::createOProfileJITEventListener()); + EE->RegisterJITEventListener( + JITEventListener::createIntelJITEventListener()); EE->DisableLazyCompilation(NoLazyCompilation); diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp index bf068c4..d630087 100644 --- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp +++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp @@ -331,7 +331,7 @@ static bool ParseBlock(BitstreamCursor &Stream, unsigned IndentLevel) { // BLOCKINFO is a special part of the stream. if (BlockID == bitc::BLOCKINFO_BLOCK_ID) { - if (Dump) errs() << Indent << "<BLOCKINFO_BLOCK/>\n"; + if (Dump) outs() << Indent << "<BLOCKINFO_BLOCK/>\n"; if (Stream.ReadBlockInfoBlock()) return Error("Malformed BlockInfoBlock"); uint64_t BlockBitEnd = Stream.GetCurrentBitNo(); @@ -345,16 +345,16 @@ static bool ParseBlock(BitstreamCursor &Stream, unsigned IndentLevel) { const char *BlockName = 0; if (Dump) { - errs() << Indent << "<"; + outs() << Indent << "<"; if ((BlockName = GetBlockName(BlockID, *Stream.getBitStreamReader()))) - errs() << BlockName; + outs() << BlockName; else - errs() << "UnknownBlock" << BlockID; + outs() << "UnknownBlock" << BlockID; if (NonSymbolic && BlockName) - errs() << " BlockID=" << BlockID; + outs() << " BlockID=" << BlockID; - errs() << " NumWords=" << NumWords + outs() << " NumWords=" << NumWords << " BlockCodeSize=" << Stream.GetAbbrevIDWidth() << ">\n"; } @@ -376,11 +376,11 @@ static bool ParseBlock(BitstreamCursor &Stream, unsigned IndentLevel) { uint64_t BlockBitEnd = Stream.GetCurrentBitNo(); BlockStats.NumBits += BlockBitEnd-BlockBitStart; if (Dump) { - errs() << Indent << "</"; + outs() << Indent << "</"; if (BlockName) - errs() << BlockName << ">\n"; + outs() << BlockName << ">\n"; else - errs() << "UnknownBlock" << BlockID << ">\n"; + outs() << "UnknownBlock" << BlockID << ">\n"; } return false; } @@ -422,25 +422,25 @@ static bool ParseBlock(BitstreamCursor &Stream, unsigned IndentLevel) { BlockStats.CodeFreq[Code].NumAbbrev++; if (Dump) { - errs() << Indent << " <"; + outs() << Indent << " <"; if (const char *CodeName = GetCodeName(Code, BlockID, *Stream.getBitStreamReader())) - errs() << CodeName; + outs() << CodeName; else - errs() << "UnknownCode" << Code; + outs() << "UnknownCode" << Code; if (NonSymbolic && GetCodeName(Code, BlockID, *Stream.getBitStreamReader())) - errs() << " codeid=" << Code; + outs() << " codeid=" << Code; if (AbbrevID != bitc::UNABBREV_RECORD) - errs() << " abbrevid=" << AbbrevID; + outs() << " abbrevid=" << AbbrevID; for (unsigned i = 0, e = Record.size(); i != e; ++i) - errs() << " op" << i << "=" << (int64_t)Record[i]; + outs() << " op" << i << "=" << (int64_t)Record[i]; - errs() << "/>"; + outs() << "/>"; if (BlobStart) { - errs() << " blob data = "; + outs() << " blob data = "; bool BlobIsPrintable = true; for (unsigned i = 0; i != BlobLen; ++i) if (!isprint(BlobStart[i])) { @@ -449,12 +449,12 @@ static bool ParseBlock(BitstreamCursor &Stream, unsigned IndentLevel) { } if (BlobIsPrintable) - errs() << "'" << std::string(BlobStart, BlobStart+BlobLen) <<"'"; + outs() << "'" << std::string(BlobStart, BlobStart+BlobLen) <<"'"; else - errs() << "unprintable, " << BlobLen << " bytes."; + outs() << "unprintable, " << BlobLen << " bytes."; } - errs() << "\n"; + outs() << "\n"; } break; @@ -525,58 +525,58 @@ static int AnalyzeBitcode() { ++NumTopBlocks; } - if (Dump) errs() << "\n\n"; + if (Dump) outs() << "\n\n"; uint64_t BufferSizeBits = (EndBufPtr-BufPtr)*CHAR_BIT; // Print a summary of the read file. - errs() << "Summary of " << InputFilename << ":\n"; - errs() << " Total size: "; + outs() << "Summary of " << InputFilename << ":\n"; + outs() << " Total size: "; PrintSize(BufferSizeBits); - errs() << "\n"; - errs() << " Stream type: "; + outs() << "\n"; + outs() << " Stream type: "; switch (CurStreamType) { - case UnknownBitstream: errs() << "unknown\n"; break; - case LLVMIRBitstream: errs() << "LLVM IR\n"; break; + case UnknownBitstream: outs() << "unknown\n"; break; + case LLVMIRBitstream: outs() << "LLVM IR\n"; break; } - errs() << " # Toplevel Blocks: " << NumTopBlocks << "\n"; - errs() << "\n"; + outs() << " # Toplevel Blocks: " << NumTopBlocks << "\n"; + outs() << "\n"; // Emit per-block stats. - errs() << "Per-block Summary:\n"; + outs() << "Per-block Summary:\n"; for (std::map<unsigned, PerBlockIDStats>::iterator I = BlockIDStats.begin(), E = BlockIDStats.end(); I != E; ++I) { - errs() << " Block ID #" << I->first; + outs() << " Block ID #" << I->first; if (const char *BlockName = GetBlockName(I->first, StreamFile)) - errs() << " (" << BlockName << ")"; - errs() << ":\n"; + outs() << " (" << BlockName << ")"; + outs() << ":\n"; const PerBlockIDStats &Stats = I->second; - errs() << " Num Instances: " << Stats.NumInstances << "\n"; - errs() << " Total Size: "; + outs() << " Num Instances: " << Stats.NumInstances << "\n"; + outs() << " Total Size: "; PrintSize(Stats.NumBits); - errs() << "\n"; + outs() << "\n"; double pct = (Stats.NumBits * 100.0) / BufferSizeBits; errs() << " Percent of file: " << format("%2.4f%%", pct) << "\n"; if (Stats.NumInstances > 1) { - errs() << " Average Size: "; + outs() << " Average Size: "; PrintSize(Stats.NumBits/(double)Stats.NumInstances); - errs() << "\n"; - errs() << " Tot/Avg SubBlocks: " << Stats.NumSubBlocks << "/" + outs() << "\n"; + outs() << " Tot/Avg SubBlocks: " << Stats.NumSubBlocks << "/" << Stats.NumSubBlocks/(double)Stats.NumInstances << "\n"; - errs() << " Tot/Avg Abbrevs: " << Stats.NumAbbrevs << "/" + outs() << " Tot/Avg Abbrevs: " << Stats.NumAbbrevs << "/" << Stats.NumAbbrevs/(double)Stats.NumInstances << "\n"; - errs() << " Tot/Avg Records: " << Stats.NumRecords << "/" + outs() << " Tot/Avg Records: " << Stats.NumRecords << "/" << Stats.NumRecords/(double)Stats.NumInstances << "\n"; } else { - errs() << " Num SubBlocks: " << Stats.NumSubBlocks << "\n"; - errs() << " Num Abbrevs: " << Stats.NumAbbrevs << "\n"; - errs() << " Num Records: " << Stats.NumRecords << "\n"; + outs() << " Num SubBlocks: " << Stats.NumSubBlocks << "\n"; + outs() << " Num Abbrevs: " << Stats.NumAbbrevs << "\n"; + outs() << " Num Records: " << Stats.NumRecords << "\n"; } if (Stats.NumRecords) { double pct = (Stats.NumAbbreviatedRecords * 100.0) / Stats.NumRecords; - errs() << " Percent Abbrevs: " << format("%2.4f%%", pct) << "\n"; + outs() << " Percent Abbrevs: " << format("%2.4f%%", pct) << "\n"; } - errs() << "\n"; + outs() << "\n"; // Print a histogram of the codes we see. if (!NoHistogram && !Stats.CodeFreq.empty()) { @@ -587,7 +587,7 @@ static int AnalyzeBitcode() { std::stable_sort(FreqPairs.begin(), FreqPairs.end()); std::reverse(FreqPairs.begin(), FreqPairs.end()); - errs() << "\tRecord Histogram:\n"; + outs() << "\tRecord Histogram:\n"; fprintf(stderr, "\t\t Count # Bits %% Abv Record Kind\n"); for (unsigned i = 0, e = FreqPairs.size(); i != e; ++i) { const PerRecordStats &RecStats = Stats.CodeFreq[FreqPairs[i].second]; @@ -607,7 +607,7 @@ static int AnalyzeBitcode() { else fprintf(stderr, "UnknownCode%d\n", FreqPairs[i].second); } - errs() << "\n"; + outs() << "\n"; } } diff --git a/tools/llvm-diff/DifferenceEngine.cpp b/tools/llvm-diff/DifferenceEngine.cpp index 8113fd4..a5a99f5 100644 --- a/tools/llvm-diff/DifferenceEngine.cpp +++ b/tools/llvm-diff/DifferenceEngine.cpp @@ -319,13 +319,17 @@ class FunctionDifferenceEngine { bool Difference = false; DenseMap<ConstantInt*,BasicBlock*> LCases; - for (unsigned I = 0, E = LI->getNumCases(); I != E; ++I) - LCases[LI->getCaseValue(I)] = LI->getCaseSuccessor(I); - for (unsigned I = 0, E = RI->getNumCases(); I != E; ++I) { - ConstantInt *CaseValue = RI->getCaseValue(I); + + for (SwitchInst::CaseIt I = LI->case_begin(), E = LI->case_end(); + I != E; ++I) + LCases[I.getCaseValue()] = I.getCaseSuccessor(); + + for (SwitchInst::CaseIt I = RI->case_begin(), E = RI->case_end(); + I != E; ++I) { + ConstantInt *CaseValue = I.getCaseValue(); BasicBlock *LCase = LCases[CaseValue]; if (LCase) { - if (TryUnify) tryUnify(LCase, RI->getCaseSuccessor(I)); + if (TryUnify) tryUnify(LCase, I.getCaseSuccessor()); LCases.erase(CaseValue); } else if (Complain || !Difference) { if (Complain) diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index dc72974..ceed2d6 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -512,6 +512,9 @@ int main(int argc, char **argv) { llvm::InitializeAllAsmParsers(); llvm::InitializeAllDisassemblers(); + // Register the target printer for --version. + cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion); + cl::ParseCommandLineOptions(argc, argv, "llvm machine code playground\n"); TripleName = Triple::normalize(TripleName); setDwarfDebugFlags(argc, argv); diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index 9cf83b6..8d9e51e 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -204,9 +204,10 @@ static void SortAndPrintSymbolList() { strcpy(SymbolSizeStr, " "); if (i->Address != object::UnknownAddressOrSize) - format("%08"PRIx64, i->Address).print(SymbolAddrStr, sizeof(SymbolAddrStr)); + format("%08" PRIx64, i->Address).print(SymbolAddrStr, + sizeof(SymbolAddrStr)); if (i->Size != object::UnknownAddressOrSize) - format("%08"PRIx64, i->Size).print(SymbolSizeStr, sizeof(SymbolSizeStr)); + format("%08" PRIx64, i->Size).print(SymbolSizeStr, sizeof(SymbolSizeStr)); if (OutputFormat == posix) { outs() << i->Name << " " << i->TypeChar << " " diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index deb4dd1..94becae 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -300,7 +300,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { if (DisAsm->getInstruction(Inst, Size, memoryObject, Index, DebugOut, nulls())) { - outs() << format("%8"PRIx64":\t", SectionAddr + Index); + outs() << format("%8" PRIx64 ":\t", SectionAddr + Index); DumpBytes(StringRef(Bytes.data() + Index, Size)); IP->printInst(&Inst, outs(), ""); outs() << "\n"; @@ -327,8 +327,8 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { if (error(rel_cur->getTypeName(name))) goto skip_print_rel; if (error(rel_cur->getValueString(val))) goto skip_print_rel; - outs() << format("\t\t\t%8"PRIx64": ", SectionAddr + addr) << name << "\t" - << val << "\n"; + outs() << format("\t\t\t%8" PRIx64 ": ", SectionAddr + addr) << name + << "\t" << val << "\n"; skip_print_rel: ++rel_cur; @@ -388,8 +388,8 @@ static void PrintSectionHeaders(const ObjectFile *o) { if (error(si->isBSS(BSS))) return; std::string Type = (std::string(Text ? "TEXT " : "") + (Data ? "DATA " : "") + (BSS ? "BSS" : "")); - outs() << format("%3d %-13s %09"PRIx64" %017"PRIx64" %s\n", i, Name.str().c_str(), Size, - Address, Type.c_str()); + outs() << format("%3d %-13s %09" PRIx64 " %017" PRIx64 " %s\n", + i, Name.str().c_str(), Size, Address, Type.c_str()); ++i; } } @@ -411,7 +411,7 @@ static void PrintSectionContents(const ObjectFile *o) { // Dump out the content as hex and printable ascii characters. for (std::size_t addr = 0, end = Contents.size(); addr < end; addr += 16) { - outs() << format(" %04"PRIx64" ", BaseAddr + addr); + outs() << format(" %04" PRIx64 " ", BaseAddr + addr); // Dump line of hex. for (std::size_t i = 0; i < 16; ++i) { if (i != 0 && i % 4 == 0) @@ -519,7 +519,7 @@ static void PrintSymbolTable(const ObjectFile *o) { else if (Type == SymbolRef::ST_Function) FileFunc = 'F'; - outs() << format("%08"PRIx64, Address) << " " + outs() << format("%08" PRIx64, Address) << " " << GlobLoc // Local -> 'l', Global -> 'g', Neither -> ' ' << (Weak ? 'w' : ' ') // Weak? << ' ' // Constructor. Not supported yet. @@ -539,7 +539,7 @@ static void PrintSymbolTable(const ObjectFile *o) { outs() << SectionName; } outs() << '\t' - << format("%08"PRIx64" ", Size) + << format("%08" PRIx64 " ", Size) << Name << '\n'; } diff --git a/tools/llvm-readobj/llvm-readobj.cpp b/tools/llvm-readobj/llvm-readobj.cpp index 3f8789d..3be1289 100644 --- a/tools/llvm-readobj/llvm-readobj.cpp +++ b/tools/llvm-readobj/llvm-readobj.cpp @@ -17,6 +17,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Object/ObjectFile.h" +#include "llvm/Object/ELF.h" #include "llvm/Analysis/Verifier.h" #include "llvm/ADT/Triple.h" #include "llvm/Support/Format.h" @@ -78,26 +79,39 @@ std::string GetFlagStr(uint32_t Flags) { return result; } -void DumpSymbol(const SymbolRef &sym) { +void DumpSymbol(const SymbolRef &Sym, const ObjectFile *obj, bool IsDynamic) { StringRef Name; SymbolRef::Type Type; uint32_t Flags; uint64_t Address; uint64_t Size; uint64_t FileOffset; - sym.getName(Name); - sym.getAddress(Address); - sym.getSize(Size); - sym.getFileOffset(FileOffset); - sym.getType(Type); - sym.getFlags(Flags); + Sym.getName(Name); + Sym.getAddress(Address); + Sym.getSize(Size); + Sym.getFileOffset(FileOffset); + Sym.getType(Type); + Sym.getFlags(Flags); + std::string FullName = Name; + + // If this is a dynamic symbol from an ELF object, append + // the symbol's version to the name. + if (IsDynamic && obj->isELF()) { + StringRef Version; + bool IsDefault; + GetELFSymbolVersion(obj, Sym, Version, IsDefault); + if (!Version.empty()) { + FullName += (IsDefault ? "@@" : "@"); + FullName += Version; + } + } // format() can't handle StringRefs - outs() << format(" %-32s", Name.str().c_str()) + outs() << format(" %-32s", FullName.c_str()) << format(" %-4s", GetTypeStr(Type)) - << format(" %16"PRIx64, Address) - << format(" %16"PRIx64, Size) - << format(" %16"PRIx64, FileOffset) + << format(" %16" PRIx64, Address) + << format(" %16" PRIx64, Size) + << format(" %16" PRIx64, FileOffset) << " " << GetFlagStr(Flags) << "\n"; } @@ -111,7 +125,7 @@ void DumpSymbols(const ObjectFile *obj) { symbol_iterator it = obj->begin_symbols(); symbol_iterator ie = obj->end_symbols(); while (it != ie) { - DumpSymbol(*it); + DumpSymbol(*it, obj, false); it.increment(ec); if (ec) report_fatal_error("Symbol iteration failed"); @@ -128,7 +142,7 @@ void DumpDynamicSymbols(const ObjectFile *obj) { symbol_iterator it = obj->begin_dynamic_symbols(); symbol_iterator ie = obj->end_dynamic_symbols(); while (it != ie) { - DumpSymbol(*it); + DumpSymbol(*it, obj, true); it.increment(ec); if (ec) report_fatal_error("Symbol iteration failed"); diff --git a/tools/llvm-rtdyld/llvm-rtdyld.cpp b/tools/llvm-rtdyld/llvm-rtdyld.cpp index 990582d..01a7d15 100644 --- a/tools/llvm-rtdyld/llvm-rtdyld.cpp +++ b/tools/llvm-rtdyld/llvm-rtdyld.cpp @@ -58,9 +58,11 @@ public: uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID); - uint8_t *startFunctionBody(const char *Name, uintptr_t &Size); - void endFunctionBody(const char *Name, uint8_t *FunctionStart, - uint8_t *FunctionEnd); + virtual void *getPointerToNamedFunction(const std::string &Name, + bool AbortOnFailure = true) { + return 0; + } + }; uint8_t *TrivialMemoryManager::allocateCodeSection(uintptr_t Size, @@ -75,18 +77,6 @@ uint8_t *TrivialMemoryManager::allocateDataSection(uintptr_t Size, return (uint8_t*)sys::Memory::AllocateRWX(Size, 0, 0).base(); } -uint8_t *TrivialMemoryManager::startFunctionBody(const char *Name, - uintptr_t &Size) { - return (uint8_t*)sys::Memory::AllocateRWX(Size, 0, 0).base(); -} - -void TrivialMemoryManager::endFunctionBody(const char *Name, - uint8_t *FunctionStart, - uint8_t *FunctionEnd) { - uintptr_t Size = FunctionEnd - FunctionStart + 1; - FunctionMemory.push_back(sys::MemoryBlock(FunctionStart, Size)); -} - static const char *ProgramName; static void Message(const char *Type, const Twine &Msg) { |