search for: instantiate

Displaying 20 results from an estimated 1774 matches for "instantiate".

Did you mean: instantiated
2009 Dec 04
4
[LLVMdev] r72619
...member template, it's instantiation is *not* suppressed (despite being in basic_string<char>), so we emit it as a weak definition. I don't have a debug llvm-gcc available to see why this might be happening. The logic to suppress instantiation based on an extern template is in instantiate_decl (gcc/cp/pt.c): /* Check to see whether we know that this template will be instantiated in some other file, as with "extern template" extension. */ external_p = (DECL_INTERFACE_KNOWN (d) && DECL_REALLY_EXTERN (d)); /* In general, we do not instantiate su...
2009 Dec 04
0
[LLVMdev] r72619
...;s instantiation is *not* suppressed (despite being > in basic_string<char>), so we emit it as a weak definition. > > I don't have a debug llvm-gcc available to see why this might be > happening. The logic to suppress instantiation based on an extern > template is in instantiate_decl (gcc/cp/pt.c): > > /* Check to see whether we know that this template will be > instantiated in some other file, as with "extern template" > extension. */ > external_p = (DECL_INTERFACE_KNOWN (d) && DECL_REALLY_EXTERN (d)); > /* In general,...
2012 Sep 28
4
[LLVMdev] Clang bug?
...think it would be worth filing this as a diagnostic QoR issue. We should be able to say something like <stdin>:3:38: error: member 'type' of 'A<B<int>::C *>' required recursively within the instantiation of 'A<B<int>::C *>', but it has not been instantiated yet On Fri, Sep 28, 2012 at 7:51 AM, Howard Hinnant <hhinnant at apple.com> wrote: > That is one evil bug! > > I just tested it against tip-of-trunk clang and it appears to be fixed > there (just fyi for everyone). > > Howard > > On Sep 27, 2012, at 7:17 PM, Adam Pe...
2012 May 04
1
[LLVMdev] Any way how to instantiate templates even when it is not necessary for the compilation?
...rsion of headers contains templates. Nothing fancy, usually stuff like: template IMyEnumerator { virtual HRESULT GetCurrent(T*item) = 0; }; class IWhateverInterface { virtual IMyEnumerator & GetEnumerator() = 0; }; And here lies the problem - since the template IMyEnumerator does not have to be instantiated for clang to compile the headers, this Specialization is not instantiated and the XML does not contain full CXXRecord of the class. I however need to know the full structure because I need to generate the glue layer for the enumerator.   It seems to me that this would be quite a common problem for...
2009 Dec 04
0
[LLVMdev] r72619
Hi Bill, > Here's what I get with TOT compiling with -Os. The orig.ll is what I get > before r72619. Notice that orig.ll has only one function in it. Both the > one you sent and duncan.ll have more than one function. It's not the > fact that more than one function is showing up, but these functions in > particular shouldn't be there because of the implicit/explicit
2009 Dec 04
2
[LLVMdev] r72619
On Dec 4, 2009, at 12:52 AM, Duncan Sands wrote: > Hi Bill, > >> There's a problem with your check-in for r72619 is causing "weak >> external" symbols to appear in C++ code when it shouldn't. Take >> this code for example, >> #include <stdexcept> >> void dummysymbol() { >> throw(std::runtime_error("string"));
2018 Jul 10
2
Is it really valid to discard externally instantiated functions from a TU when marked inline?
...ate specializations, explicit instantiation declarations have the effect of suppressing the implicit instantiation of the definition of the entity to which they refer. [ Note: The intent is that an inline function that is the subject of an explicit instantiation declaration will still be implicitly instantiated when odr-used so that the body can be considered for inlining, but that no out-of-line copy of the inline function would be generated in the translation unit. — end note ] Only reading the normative wording, it seems like LLVM should leave the instantiation there because it can't actually ass...
2012 Sep 29
0
[LLVMdev] Clang bug?
...filing this as a diagnostic QoR issue. We should > be able to say something like > > <stdin>:3:38: error: member 'type' of 'A<B<int>::C *>' required recursively > within the instantiation of 'A<B<int>::C *>', but it has not been > instantiated yet > > On Fri, Sep 28, 2012 at 7:51 AM, Howard Hinnant <hhinnant at apple.com> wrote: >> >> That is one evil bug! >> >> I just tested it against tip-of-trunk clang and it appears to be fixed >> there (just fyi for everyone). >> >> Howard >&...
2009 Dec 04
2
[LLVMdev] r72619
...* suppressed (despite >> being >> in basic_string<char>), so we emit it as a weak definition. >> >> I don't have a debug llvm-gcc available to see why this might be >> happening. The logic to suppress instantiation based on an extern >> template is in instantiate_decl (gcc/cp/pt.c): >> >> /* Check to see whether we know that this template will be >> instantiated in some other file, as with "extern template" >> extension. */ >> external_p = (DECL_INTERFACE_KNOWN (d) && DECL_REALLY_EXTERN (d)); >&g...
2012 Sep 27
4
[LLVMdev] Clang bug?
Is this a relevant location to provide information about what I believe is a compiler bug in clang? If not, please forgive me for posting it here. (Perhaps you can redirect me to some place more appropriate.) If so, here are the details: I have a short 15-line C++ program using only one standard header that clang fails to compile properly under C++11 with the new standard library (although the
2009 Jan 16
1
[LLVMdev] Problem using ilist container
...hment.html> -------------- next part -------------- /usr/local/llvm/src/include/llvm/ADT/ilist.h: In static member function 'static NodeTy* llvm::ilist_nextprev_traits<NodeTy>::getPrev(NodeTy*) [with NodeTy = llvm::Instruction*]': /usr/local/llvm/src/include/llvm/ADT/ilist.h:268: instantiated from 'NodeTy* llvm::iplist<NodeTy, Traits>::getTail() [with NodeTy = llvm::Instruction*, Traits = llvm::ilist_traits<llvm::Instruction*>]' /usr/local/llvm/src/include/llvm/ADT/ilist.h:306: instantiated from 'llvm::iplist<NodeTy, Traits>::~iplist() [with NodeTy = llv...
2012 May 08
0
[LLVMdev] Any way how to instantiate templates even when it is not necessary for the compilation?
...doing the > template parameter substitution within my code as this looks > nontrivial, very error prone, and not all the necessary information > for the substitution is currently available in XML. > > I currently plan to try to somehow hack the parser to call the > function which instantiates templates from some convenient place, > although whether I will be able to find such a place and the correct > function I am not certain. This is why I have tried to find some > alternate solution via this mail. > > Ondrej > > > On Tue, May 8, 2012 at 1:03 AM, Nathan Jeffor...
2014 Aug 12
4
[LLVMdev] Explicit template instantiations in libc++
Most of libc++ doesn't have explicit template instantiations, which leads to a pretty significant build time and code size cost when using libc++, since a large number of common templates will be emitted by the compiler and coalesced by the linker. Notably, in include/__config, we have: #ifndef _LIBCPP_EXTERN_TEMPLATE #define _LIBCPP_EXTERN_TEMPLATE(...) #endif whereas before
2009 Oct 01
2
Any way to avoid instantiating a class twice?
...and folders depending on what sets of information the user accesses. Once built, this class instantiation contains all the information necessary for several pages (controllers/views) to operate. However at times it can take up to 10 seconds to process. It could be incredibly time consuming to re-instantiate the class every time I load any related sub-views/controllers. The information contained in the instantiation is too large to fit into a session variable and too complex to be passed back in a query string. Also I should note that it is different for each user, so it can''t be used as some...
2011 Nov 30
0
[LLVMdev] -Wunreachable-code and templates
....cpp and use the check in CFG.cpp (& add another check to ignore the actual template instantiations)). This, I believe, should remove the false positives with a minimum of fuss. It will also remove a bunch of correct positive reports from specific template instantiations (for example if we only instantiated func<true> above, the false case is unreachable but would not produce a warning) 2) A more interesting option would be to visit the instantiations, but instead of reporting on the instantiation, build a CFG of the original template (this would require effectively inter-function analysis - a...
2012 May 07
0
[LLVMdev] Any way how to instantiate templates even when it is not necessary for the compilation?
...ESULT GetCurrent(T*item) = 0; > }; > class IWhateverInterface { > virtual IMyEnumerator<int> & GetEnumerator() = 0; > }; > And here lies the problem - since the template IMyEnumerator<int> is > only used in this declaration, this template specialization is not > instantiated and the XML does not contain full CXXRecord of the class. > I however need to know the full structure of the type because I need > to generate the glue layer for the enumerator. > > It seems to me that this would be quite a common problem for similar > tools and someone might have s...
2012 Sep 28
0
[LLVMdev] Clang bug?
That is one evil bug! I just tested it against tip-of-trunk clang and it appears to be fixed there (just fyi for everyone). Howard On Sep 27, 2012, at 7:17 PM, Adam Peterson <alpha.eta.pi at gmail.com> wrote: > Is this a relevant location to provide information about what I > believe is a compiler bug in clang? If not, please forgive me for > posting it here. (Perhaps you can
2012 Sep 29
1
[LLVMdev] Clang bug?
...ue. We > should > > be able to say something like > > > > <stdin>:3:38: error: member 'type' of 'A<B<int>::C *>' required > recursively > > within the instantiation of 'A<B<int>::C *>', but it has not been > > instantiated yet > > > > On Fri, Sep 28, 2012 at 7:51 AM, Howard Hinnant <hhinnant at apple.com> > wrote: > >> > >> That is one evil bug! > >> > >> I just tested it against tip-of-trunk clang and it appears to be fixed > >> there (just fyi for e...
2012 Sep 29
2
[LLVMdev] Clang bug?
...s as a diagnostic QoR issue. We > should be able to say something like > > > > <stdin>:3:38: error: member 'type' of 'A<B<int>::C *>' required > recursively within the instantiation of 'A<B<int>::C *>', but it has not > been instantiated yet > > Hi Richard, > > Is your position that tot clang/libc++ is in error for not producing a > diagnostic? > No, my position is the opposite. Trunk clang + libc++ still reject this: #include <type_traits> template<typename T> struct S { static_assert(sizeof(T) ==...
2006 Jan 25
0
Changing the instantiated table when using STI
Is there any way to get AR to instantiate a different class when using STI? Where it would normally instantiate Digit, I would like it to instantiate SkelDigit. Here''s why... My rails app has the following STI hierarchy: Digit < Glyph < ActiveRecord::Base My migrate script can''t use those classes directly...