[LLVMbugs] [Bug 19692] New: transitive module define/undefine not quite right
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu May 8 15:18:50 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19692
Bug ID: 19692
Summary: transitive module define/undefine not quite right
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Modules
Assignee: unassignedclangbugs at nondot.org
Reporter: richard-llvm at metafoo.co.uk
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Suppose we have:
module cstd.stdint:
#define INT64_MAX 42
module LLVMSupport.Blah:
#include "stdint.h"
module LLVMSupport.AIXDataTypesFix
#undef INT64_MAX
module LLVMTarget.Blah:
import LLVMSupport.Blah;
int use = INT64_MAX;
module LLVMTarget.Foo:
// stuff
my.cc:
import LLVMTarget.Foo
import stdint
int k = INT64_MAX; // error!
We reject the last line because we can't find a definition of INT64_MAX. What
went wrong here is that LLVM_Target emitted the IdentifierInfo data for
'INT64_MAX' but didn't include the overriding information for imported macro
definitions, and we didn't look into LLVMSupport nor into cstd when looking for
the macro because they're transitively imported by LLVMTarget.
=> We need to re-export the visibility and overriding information when we
re-export another module file's macro definitions.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140508/2943d2b3/attachment.html>
More information about the llvm-bugs
mailing list