1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Changed to Chris Lattner's suggested approach, which

merely stubs out the blocks-based disassembly functions
if the library wasn't built with blocks, which allows a
constant .exports file and also properly deals with
situations in which the compiler used to build a client
is different from the compiler used to build the library.

llvm-svn: 95034
This commit is contained in:
Sean Callanan 2010-02-02 00:04:46 +00:00
parent 4d489ea053
commit d41b7acd7a
4 changed files with 16 additions and 42 deletions

View File

@ -248,4 +248,18 @@ int EDBlockVisitTokens(EDInstRef inst,
return inst->visitTokens(visitor);
}
#else
extern "C" unsigned int EDBlockCreateInsts() {
return 0;
}
extern "C" int EDBlockEvaluateOperand() {
return -1;
}
extern "C" int EDBlockVisitTokens() {
return -1;
}
#endif

View File

@ -1,28 +0,0 @@
_EDGetDisassembler
_EDGetRegisterName
_EDRegisterIsStackPointer
_EDRegisterIsProgramCounter
_EDCreateInsts
_EDReleaseInst
_EDInstByteSize
_EDGetInstString
_EDInstIsBranch
_EDInstIsMove
_EDBranchTargetID
_EDMoveSourceID
_EDMoveTargetID
_EDNumTokens
_EDGetToken
_EDGetTokenString
_EDOperandIndexForToken
_EDTokenIsWhitespace
_EDTokenIsPunctuation
_EDTokenIsOpcode
_EDTokenIsLiteral
_EDTokenIsRegister
_EDTokenIsNegativeLiteral
_EDLiteralTokenAbsoluteValue
_EDRegisterTokenValue
_EDNumOperands
_EDGetOperand
_EDEvaluateOperand

View File

@ -10,7 +10,7 @@
LEVEL = ../..
LIBRARYNAME = EnhancedDisassembly
BUILT_SOURCES = EDInfo.inc EnhancedDisassembly.exports
BUILT_SOURCES = EDInfo.inc
# Include this here so we can get the configuration of the targets
# that have been configured for construction. We have to do this
@ -34,7 +34,7 @@ ifeq ($(HOST_OS),Darwin)
# extra options to override libtool defaults
LLVMLibsOptions := $(LLVMLibsOptions) \
-avoid-version \
-Wl,-exported_symbols_list -Wl,EnhancedDisassembly.exports \
-Wl,-exported_symbols_list -Wl,$(PROJ_SRC_DIR)/EnhancedDisassembly.exports \
-Wl,-dead_strip \
-Wl,-seg1addr -Wl,0xE0000000
@ -51,17 +51,5 @@ EDInfo.inc: $(TBLGEN)
$(Echo) "Building semantic information header"
$(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null
EnhancedDisassembly.exports: EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports.blocks
$(Echo) "Copying exports file"
ifeq ($(HOST_OS),Darwin)
$(Verb) if [ $(DARWIN_VERS) -ge 10 ] ; \
then $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports ; \
else $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports ; \
fi
else
$(Verb) $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports
endif
clean::
-$(Verb) $(RM) -f EDInfo.inc
-$(Verb) $(RM) -f EnhancedDisassembly.exports