[PATCH] D71241: [OpenMP][WIP] Use overload centric declare variants
Hal Finkel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 12 16:50:56 PST 2019
hfinkel added a comment.
In D71241#1782723 <https://reviews.llvm.org/D71241#1782723>, @ABataev wrote:
> I don't insist on function redefinition solution. You want to replace functions - fine, but do this at the codegen, not in AST.
Again, no one is replacing anything, and we're not mutating the AST. We're simply resolving the callee according to the language rules. That's something that should be done during AST construction.
It's like if I have this code:
template <int x>
int foo() { return 0; }
template <>
int foo<8>() { return 1; }
int main() {
return foo<8>();
}
and you said that, in the AST, it should look like the unspecialized `foo` was being called. And then later, in CodeGen, something happened in order to cause the correct specialization would be called. That clearly would not be considered an acceptable design.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71241/new/
https://reviews.llvm.org/D71241
More information about the cfe-commits
mailing list