Skip to content
Snippets Groups Projects
  1. Jul 18, 2014
    • Hal Finkel's avatar
      Mark C++ reference parameters as dereferenceable · 4cdf252c
      Hal Finkel authored
      Because references must be initialized using some evaluated expression, they
      must point to something, and a callee can assume the reference parameter is
      dereferenceable. Taking advantage of a new attribute just added to LLVM, mark
      them as such.
      
      Because dereferenceability in addrspace(0) implies nonnull in the backend, we
      don't need both attributes. However, we need to know the size of the object to
      use the dereferenceable attribute, so for incomplete types we still emit only
      nonnull.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213386 91177308-0d34-0410-b5e6-96231b3b80d8
      4cdf252c
Loading