Displaying 5 results from an estimated 5 matches for "getsimplifiedvalue".
2010 Jul 21
2
[LLVMdev] Casting.h illness
...may get
some strange behaviour.
2) When Val is an iterator, it will be simplified at least two times, namely
in isa<> and in cast<>.
My suggestion is to simplify Val to a pointer first and then do the
comparison against NULL, the instance check and the cast.
I tried this (using getSimplifiedValue), but got further problems and had to
add a specialization
+template<typename From> struct simplify_type<From*const> {
+ typedef From* SimpleType;
+ static SimpleType &getSimplifiedValue(From*const &Val) {
+ return const_cast<From*&>(Val);
+ }
+};
Is there a si...
2010 Jul 21
0
[LLVMdev] Casting.h illness
...gt;
> 2) When Val is an iterator, it will be simplified at least two times, namely
> in isa<> and in cast<>.
>
> My suggestion is to simplify Val to a pointer first and then do the
> comparison against NULL, the instance check and the cast.
>
> I tried this (using getSimplifiedValue), but got further problems and had to
> add a specialization
>
> +template<typename From> struct simplify_type<From*const> {
> + typedef From* SimpleType;
> + static SimpleType &getSimplifiedValue(From*const &Val) {
> + return const_cast<From*&>(...
2006 Mar 15
0
[LLVMdev] RE: Port to Solaris' Sun Studio 8
...gram:
#include "llvm/Analysis/LoadValueNumbering.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/BasicBlock.h"
using namespace llvm;
template<class T>
void test(const T& val)
{
simplify_type<T>::getSimplifiedValue(val).no_such_method();
}
void foo()
{
BasicBlock::iterator I;
test(I);
}
With the following command:
CC -I <path-to-llvm-includes-directory> -D__STDC_LIMIT_MACROS=1
file.cpp
You should get one compile error on attempt to call 'no_such_metho...
2006 Mar 14
2
[LLVMdev] Port to Solaris' Sun Studio 8
Well, line 364 wasn't actually what was holding me up, so it's a bad
example, but the problem's still relevant. Using cast<...>(iter),
dyn_cast<...>(iter), or isa<...>(iter) results in the error messages
mentioned below.
________________________________
When compiling LoadValueNumbering.cpp, I get the following errors:
2010 Jul 21
2
[LLVMdev] Casting.h illness
...iterator, it will be simplified at least two times, namely
>> in isa<> and in cast<>.
>>
>> My suggestion is to simplify Val to a pointer first and then do the
>> comparison against NULL, the instance check and the cast.
>>
>> I tried this (using getSimplifiedValue), but got further problems and had to
>> add a specialization
>>
>> +template<typename From> struct simplify_type<From*const> {
>> + typedef From* SimpleType;
>> + static SimpleType &getSimplifiedValue(From*const &Val) {
>> + return cons...