root
root copied to clipboard
Update IncrementalCUDADeviceCompiler.cpp - change string comparison to exact match for "-include"
Modified the loop to use exact string comparison (s == "-include") instead of checking if the string starts with "-include" (s.find("-include") == 0) to ensure only exact matches are considered.
Explanation
(s.find("-include"): Addsstoargvifsstarts with"-include".(s == "-include"): Addsstoargvonly ifsis exactly"-include".
The first snippet is more inclusive, as it will match any string that begins with "-include", such as "-include-pch" or something else starting with "-include", while the second snippet will only match the exact string "-include".