From 79b222c39f0e4377b49191b6aba080b1607f3fa7 Mon Sep 17 00:00:00 2001 From: Anastasia Stulova Date: Tue, 9 Feb 2021 15:08:46 +0000 Subject: [OpenCL] Fix types with signed prefix in arginfo metadata. Signed prefix is removed and the single word spelling is printed for the scalar types. Tags: #clang Differential Revision: https://reviews.llvm.org/D96161 --- clang/lib/CodeGen/CodeGenModule.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 62448b74c727..1c28c50e60f5 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1501,6 +1501,8 @@ void CodeGenModule::GenOpenCLArgMetadata(llvm::Function *Fn, // Turn "unsigned type" to "utype" if (typeNameRef.consume_front("unsigned ")) return std::string("u") + typeNameRef.str(); + if (typeNameRef.consume_front("signed ")) + return typeNameRef.str(); } return typeName; -- cgit v1.2.3