similar to: [LLVMdev] C++ Casting

Displaying 20 results from an estimated 5000 matches similar to: "[LLVMdev] C++ Casting"

2016 Jan 30
0
Question: C-style casting in Casting.h
I was poking through the black magic in Casting.h, and I see this interesting struct/function: template<class To, class FromTy> struct cast_convert_val<To,FromTy,FromTy> { // This _is_ a simple type, just cast it. static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) { typename cast_retty<To, FromTy>::ret_type Res2 = (typename
2012 Nov 30
0
[LLVMdev] [cfe-dev] UB in TypeLoc casting
On Thu, Nov 29, 2012 at 3:49 PM, David Blaikie <dblaikie at gmail.com> wrote: > Moving to LLVM dev to discuss the possibility of extending the cast > infrastructure to handle this. > > On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote: >> On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote: >>> TypeLoc
2006 Feb 14
1
[LLVMdev] dynamic_cast error
Hello, Following statement from LLVM Programmer's Manual is not compiling. CallInst* callInst = dyn_cast<CallInst>(&*basic_block_iterator_1); The gcc version is : gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8) ============ Error message ============ llvm/include/llvm/Support/Casting.h: In function 'bool llvm::isa_impl(const From&) [with To = llvm::CallInst, From =
2011 Jul 09
4
[LLVMdev] type-system-rewrite branch landing tomorrow
> ... and it's in.  Please let me know if you see any problems. My clang self-hosted build (Release+Asserts on Release+Asserts, Linux x86_64) fails with: make[2]: Entering directory `/home/jay/llvm/objdir-self/tools/opt' llvm[2]: Compiling GraphPrinters.cpp for Debug+Asserts build clang: /home/jay/svn/llvm-project/llvm/trunk/include/llvm/Support/Casting.h:194: typename
2011 Jul 09
0
[LLVMdev] type-system-rewrite branch landing tomorrow
Jay Foad wrote: >> ... and it's in. Please let me know if you see any problems. > > My clang self-hosted build (Release+Asserts on Release+Asserts, Linux > x86_64) fails with: > > make[2]: Entering directory `/home/jay/llvm/objdir-self/tools/opt' > llvm[2]: Compiling GraphPrinters.cpp for Debug+Asserts build > clang:
2010 Jul 21
2
[LLVMdev] Casting.h illness
Hi all, at the moment I am trying to fix an unnecessary iterator dereferencing in Casting.h and am uncovering several ugly things. For example, look at this code: > // dyn_cast_or_null<X> - Functionally identical to dyn_cast, except that a null > // value is accepted. > // > template <class X, class Y> > inline typename cast_retty<X, Y>::ret_type
2010 Jul 21
0
[LLVMdev] Casting.h illness
Is this a recommended approach/good style/good idea to use dyn_cast_or_null<X>(I) instead of dyn_cast_or_null<X>(*I)? (And other is and cast functions). Eugene On Wed, Jul 21, 2010 at 12:42 PM, Gabor Greif <gabor at mac.com> wrote: > Hi all, > > at the moment I am trying to fix an unnecessary iterator dereferencing > in Casting.h and am uncovering several ugly
2011 Jul 09
2
[LLVMdev] type-system-rewrite branch landing tomorrow
Nick Lewycky wrote: > Jay Foad wrote: >>> ... and it's in. Please let me know if you see any problems. >> >> My clang self-hosted build (Release+Asserts on Release+Asserts, Linux >> x86_64) fails with: >> >> make[2]: Entering directory `/home/jay/llvm/objdir-self/tools/opt' >> llvm[2]: Compiling GraphPrinters.cpp for Debug+Asserts build
2016 Oct 29
1
Problems with Inline ASM expressions generated in the back end
Hello. I generated in the back end by hand (in C++ code, not with TableGen) some fancy assembly code using Inline ASM expressions and if I use 2 functions in my source code (but NOT just 1 function; I will not present the functions, but each requires me to generate an Inline ASM expression) I get this error at compilation (at scheduling): BB#0: derived from LLVM BB %entry
2012 Sep 05
1
[LLVMdev] Calling a function with a pointer to a global char array as argument
Hello; Thanks to Eli for the pointer to the ConstantDataArray::getString() fucntion. Now I am trying to declare a global char array with the content "hi" and call a function "print" (which takes a char pointer and return an insteger. I am doing the following in the code - Function Creation: PointerType* array = PointerType::get(IntegerType::getInt8Ty(getGlobalContext())
2011 Mar 25
1
[LLVMdev] Instrumentation with liblto and gold
Hi John, Thank you for your advice. LIBS and LDFLAGS work for the configure script, but they gave errors in the make stage for apache and mysql. I used either of the following ones with other flags: - export LIBS="-L/home/sangmin/Dropbox/Falcon/bin/ -ldummy" - export LDFLAGS="-L/home/sangmin/Dropbox/Falcon/bin/ -ldummy" Here are the error messages: Compile error (apache):
2012 Nov 12
0
[LLVMdev] Need help reading the LLVM Buildbot results
On Sat, Nov 10, 2012 at 3:21 AM, Patrik Hägglund H <patrik.h.hagglund at ericsson.com> wrote: > From r167602 and onwards I get a fail in 'make check-all' for llvm+clang, > built with gcc-4.7.1 (but not with clang-3.1) on Linux x86_64: > > Failing Tests (1): > Clang :: CodeGenCXX/mangle-ms-templates.cpp > > clang:
2003 Nov 15
0
[LLVMdev] C++ Casting
On Sat, 15 Nov 2003, Reid Spencer wrote: > In compiling my software to use LLVM, I have noticed many occurrences of > C style casting in LLVM header files. Since I compile with the > -Wold-style-cast flag to g++, I get warnings about each of them. This > isn't a big deal but I try to keep my code compilations both error > and warning free (makes spotting true errors easier).
2010 Jul 21
2
[LLVMdev] Casting.h illness
On Jul 21, 2010, at 12:49 PM, Eugene Toder wrote: > Is this a recommended approach/good style/good idea to use > dyn_cast_or_null<X>(I) instead of dyn_cast_or_null<X>(*I)? (And other > is and cast functions). We generally don't want auto-dereference. There is some special magic for unwrapping Uses etc though. Is this what you're in contact with Gabor? -Chris >
2012 Feb 08
2
[LLVMdev] Crash/Assert on -loop-reduce
opt: /home/ryan/llvm/llvm_core/llvm-3.0/include/llvm/Support/Casting.h:194: typename cast_retty<Instruction, User *>::ret_type llvm::cast(llvm::User *const &): Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed. 0 opt 0x000000000085cfef 1 opt 0x000000000085d509 2 libpthread.so.0 0x00007fdb30054c60 3
2012 Nov 29
2
[LLVMdev] [cfe-dev] UB in TypeLoc casting
Moving to LLVM dev to discuss the possibility of extending the cast infrastructure to handle this. On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote: > On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote: >> TypeLoc casting looks bogus. >> >> TypeLoc derived types return true from classof when the dynamic type >>
2016 Sep 26
2
Incompatible type assertion from llvm-tblgen
I'm getting this incompatible type assertion when I run tblgen on my .td files: llvm/include/llvm/Support/Casting.h:237: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::DefInit; Y = llvm::Init; typename llvm::cast_retty<X, Y*>::ret_type = llvm::DefInit*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible
2010 Jul 29
0
[LLVMdev] LLVM ERROR: Invalid primitive type.. Is this a bug?
> I have: > int main() > { > int i = 1; > } > in test.c. > > Then: > llvm-gcc -emit-llvm -O0 -c test.c -o test.bc -g > llc -march=cpp test.bc > gives me: > LLVM ERROR: Invalid primitive type > > This only happens when I use the "-g". Is this a bug? Yes, it is a bug. In fact LLVM from subversion from a few days ago crashes even without
2012 Feb 08
0
[LLVMdev] Crash/Assert on -loop-reduce
On Tue, Feb 7, 2012 at 5:52 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > opt: /home/ryan/llvm/llvm_core/llvm-3.0/include/llvm/Support/Casting.h:194: > typename cast_retty<Instruction, User *>::ret_type llvm::cast(llvm::User > *const &): Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible > type!"' failed. > 0 
2012 Feb 13
2
[LLVMdev] Error compiling simple loop, Casting.h used by Polly
clang: /home/ryan/llvm/llvm_core/llvm-3.0/include/llvm/Support/Casting.h:194: typename cast_retty<PHINode, ilist_iterator<Instruction> >::ret_type llvm::cast(const llvm::ilist_iterator<llvm::Instruction> &): Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed. 0 clang 0x0000000001b3618f 1 clang