[llvm] r208680 - [un]wrap extracted from lib/Target/Target[MachineC].cpp, lib/ExecutionEngine/ExecutionEngineBindings.cpp into include/llvm/IR/DataLayout.h
Timur Iskhodzhanov
timurrrr at google.com
Tue May 13 03:33:56 PDT 2014
FYI this seems to break the build, at least on Windows.
lib\ExecutionEngine\ExecutionEngineBindings.cpp(320) : error C2872:
'LLVMTargetDataRef' : ambiguous symbol
could be 'include\llvm-c/Target.h(42) : LLVMOpaqueTargetData
*LLVMTargetDataRef'
or 'include\llvm/IR/DataLayout.h(448) : llvm::LLVMTargetDataRef'
2014-05-13 13:45 GMT+04:00 Artyom Skrobov <Artyom.Skrobov at arm.com>:
> Author: askrobov
> Date: Tue May 13 04:45:26 2014
> New Revision: 208680
>
> URL: http://llvm.org/viewvc/llvm-project?rev=208680&view=rev
> Log:
> [un]wrap extracted from lib/Target/Target[MachineC].cpp,
> lib/ExecutionEngine/ExecutionEngineBindings.cpp into
> include/llvm/IR/DataLayout.h
>
> Modified:
> llvm/trunk/include/llvm/IR/DataLayout.h
> llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp
> llvm/trunk/lib/Target/Target.cpp
> llvm/trunk/lib/Target/TargetMachineC.cpp
>
> Modified: llvm/trunk/include/llvm/IR/DataLayout.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DataLayout.h?rev=208680&r1=208679&r2=208680&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/DataLayout.h (original)
> +++ llvm/trunk/include/llvm/IR/DataLayout.h Tue May 13 04:45:26 2014
> @@ -445,6 +445,16 @@ public:
> }
> };
>
> +typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
> +
> +inline DataLayout *unwrap(LLVMTargetDataRef P) {
> + return reinterpret_cast<DataLayout*>(P);
> +}
> +
> +inline LLVMTargetDataRef wrap(const DataLayout *P) {
> + return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout*>(P));
> +}
> +
> class DataLayoutPass : public ImmutablePass {
> DataLayout DL;
>
>
> Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp?rev=208680&r1=208679&r2=208680&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp Tue May 13
> 04:45:26 2014
> @@ -27,14 +27,6 @@ using namespace llvm;
> // Wrapping the C bindings types.
> DEFINE_SIMPLE_CONVERSION_FUNCTIONS(GenericValue, LLVMGenericValueRef)
>
> -inline DataLayout *unwrap(LLVMTargetDataRef P) {
> - return reinterpret_cast<DataLayout*>(P);
> -}
> -
> -inline LLVMTargetDataRef wrap(const DataLayout *P) {
> - return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout*>(P));
> -}
> -
> inline TargetLibraryInfo *unwrap(LLVMTargetLibraryInfoRef P) {
> return reinterpret_cast<TargetLibraryInfo*>(P);
> }
>
> Modified: llvm/trunk/lib/Target/Target.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Target.cpp?rev=208680&r1=208679&r2=208680&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/Target.cpp (original)
> +++ llvm/trunk/lib/Target/Target.cpp Tue May 13 04:45:26 2014
> @@ -24,14 +24,6 @@
>
> using namespace llvm;
>
> -inline DataLayout *unwrap(LLVMTargetDataRef P) {
> - return reinterpret_cast<DataLayout*>(P);
> -}
> -
> -inline LLVMTargetDataRef wrap(const DataLayout *P) {
> - return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout*>(P));
> -}
> -
> inline TargetLibraryInfo *unwrap(LLVMTargetLibraryInfoRef P) {
> return reinterpret_cast<TargetLibraryInfo*>(P);
> }
>
> Modified: llvm/trunk/lib/Target/TargetMachineC.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachineC.cpp?rev=208680&r1=208679&r2=208680&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/TargetMachineC.cpp (original)
> +++ llvm/trunk/lib/Target/TargetMachineC.cpp Tue May 13 04:45:26 2014
> @@ -30,23 +30,6 @@
>
> using namespace llvm;
>
> -inline DataLayout *unwrap(LLVMTargetDataRef P) {
> - return reinterpret_cast<DataLayout*>(P);
> -}
> -
> -inline LLVMTargetDataRef wrap(const DataLayout *P) {
> - return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout*>(P));
> -}
> -
> -inline TargetLibraryInfo *unwrap(LLVMTargetLibraryInfoRef P) {
> - return reinterpret_cast<TargetLibraryInfo*>(P);
> -}
> -
> -inline LLVMTargetLibraryInfoRef wrap(const TargetLibraryInfo *P) {
> - TargetLibraryInfo *X = const_cast<TargetLibraryInfo*>(P);
> - return reinterpret_cast<LLVMTargetLibraryInfoRef>(X);
> -}
> -
> inline TargetMachine *unwrap(LLVMTargetMachineRef P) {
> return reinterpret_cast<TargetMachine*>(P);
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140513/db8bd471/attachment.html>
More information about the llvm-commits
mailing list