3 ms·
Thanks! I'm positive I submitted the URL with the line number, but it's possible HN removed it for spam/remote execution filtering or something. This very inte
by delta_p_delta_x 3y ago
Thanks! I'm positive I submitted the URL with the line number, but it's possible HN removed it for spam/remote execution filtering or something.
This very interesting behaviour of clang actually comes from several other places as well.
`IsClangCL()` that returns true if the driver mode is "cl": https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0df3e53340159c034f08533d/clang/lib/Driver/Driver.cpp#L6608 https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...
`setDriverMode()` which sets the above: https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0df3e53340159c034f08533d/clang/lib/Driver/Driver.cpp#L1201 https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...
This line that actually sets the triplet, the object format, etc: https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0df3e53340159c034f08533d/clang/lib/Driver/Driver.cpp#L1291 https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...
Notice how `IsClangCL(getDriverMode(ProgName, ...))` is called in this line: https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0df3e53340159c034f08533d/clang/tools/driver/driver.cpp#L375 https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...
- dang 3y agoOk, I've restored the URL you submitted (https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0df3e53340159c034f08533d/clang/lib/Driver/Driver.cpp#L1291 https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...).
- delta_p_delta_x 3y agoCheers!